ARC12 simplified version solution