[Pass 2] POJ 3624: Charm Bracelet. Solved on 07/17/2014.