How can I help?
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. Your task is to write a program that provides Vasya with precise instructions to produce the desired text using the minimum number of copy-paste actions.
Input
The first line of the input contains the text that Vasya needs to type. The text consists of N lowercase Latin letters (1 ≤ N ≤ 10,000).
Output
On the first line of the output, print a single number K — the number of actions Vasya needs to perform. Each of the following K 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 1 to N inclusive), another space, and the position of the character immediately after the copied fragment (from 2 to N+1 inclusive).