Vasya's keyboard is broken, and now he can only type text using a mouse. In one action, he can either copy a single letter from the symbol table or copy a fragment of the text he has already typed, and then append this fragment to the end of the text he is typing. To avoid confusion, Vasya can only insert text at the end of the existing text. Write a program that provides Vasya with precise instructions to obtain the given text using the minimum number of copy-paste actions.
The first line of the input contains the text that Vasya needs to type. The text consists of lowercase Latin letters, where 1 \leq N \leq 10\,000.
On the first line of the output, print a single number — the number of actions Vasya needs to perform. Each of the following lines should contain either the word letter in lowercase without quotes, or the word copy, followed by a space, the position of the first character of the copied fragment (from to inclusive), another space, and the position of the character immediately after the copied fragment (from to N + 1 inclusive).
Example 1