Count and Say

00:00
EasyStringSimulation
GoogleAmazon

Generate the nth term of the count-and-say sequence. Each term is a spoken description of the previous: '1' → '11' (one 1) → '21' (two 1s) → '1211' (one 2, one 1).

Examples

Input → n=1
Output → '1'
Input → n=4
Output → '1211'
Input → n=6
Output → '312211'