Solution to kata 6