{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Chef Palin, as his name suggests, is always very interested in palindromic strings. Recently, he made a pretty interesting discovery on palindromes and that made him feel really Lucky. He came across something known as Lucky Palindromes. He defines a string as being a lucky palindrome if it is a palindrome containing the string \"lucky\" as a substring. As always, now he wants to turn every string he comes across into a lucky palindrome. Being a chef, he is a man of patience and creativity, so he knows the operation of replacing any character of the string with any other character very well and he can perform this action infinitely many times. He wants you to write a program that can help him convert a given string to a lucky palindrome using the minimum number of operations and if several such lucky palindromes are possible, then output the lexicographically smallest one.\n\u003cbr /\u003e\u003cbr /\u003e\u003cb\u003eInput\u003c/b\u003e\n\u003cbr /\u003e\u003cbr /\u003e\nThe first line contains a single integer T \u003c\u003d 100 the number of testcases. The following T lines each contain a string of length \u003c\u003d 1000 and only containing characters \u0027a\u0027-\u0027z\u0027.\n\u003cbr /\u003e\u003cbr /\u003e\u003cb\u003eOutput\u003c/b\u003e\n\u003cbr /\u003e\u003cbr /\u003e\nFor each line of testcase, your program should output on a single line, the required lucky palindrome along with the minimum number of operations, both separated by a single space. If there is no lucky palindrome possible, then just output \"unlucky\" in a single line.\n\u003cbr /\u003e\u003cbr /\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\nlaubcdkey\nluckycodechef\naaaaaaaa\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eluckykcul 8\nluckycocykcul 6\nunlucky\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}