시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB22191392.857%

문제

A palindrome is a string that reads the same forwards as backwards. For example, radar, noon, and a are palindromes, while bathtub, thought, and is are not.

Given a string $S$ consisting only of lowercase English letters. You can rearrange the letters in $S$ in any order you like. Your task is to split $S$ after rearrangement into as few palindromic substrings as possible.

입력

The first and only line contains the string $S$ ($1 \le |S| \le 200000$) containing lowercase English letters.

출력

On the first line, print the minimum number $k$ of palindrome substrings.

On the next $k$ lines, print the palindromes that the string $S$ (after rearrangement) can be split into. If there are multiple ways to split, you may output any of them.

예제 입력 1

larcevalecer

예제 출력 1

2
level
racecar

예제 입력 2

abab

예제 출력 2

1
baab

예제 입력 3

indonesianationalcontest

예제 출력 3

8
i
incni
stats
nnn
ala
odo
t
eoe

노트

Explanation of Sample 1: We can rearrange the input string into levelracecar, then split the string into two palindromes: level and racecar. No rearrangement can produce a single palindrome, so the minimum number of palindromes is $2$.