import std.algorithm;
import std.array;
import std.range;
import std.stdio;
import std.string;

string solve (string s, int i, int j, int n)
{
	char [13] [2] res;
	int loopLength = (j - i + 1) / 2;
	while (i > 0)
	{
		s = s[1..$] ~ s[0];
		i -= 1;
		j -= 1;
	}
	debug {writeln (s, " ", i, " ", j);}

	int mid = loopLength - 1;
	mid = min (mid, 12);
	int pos = mid;
	res[0][pos] = s[i];
	while (pos > 0)
	{
		pos -= 1;
		i += 1;
		res[0][pos] = s[i];
	}
	i += 1;
	res[1][pos] = s[i];
	while (i < j - 1)
	{
		pos += 1;
		i += 1;
		res[1][pos] = s[i];
	}
	i += 1;
	assert (i == j);
	pos = mid;
	assert (res[0][pos] == s[i]);
	while (pos < 12)
	{
		pos += 1;
		i += 1;
		res[0][pos] = s[i];
	}
	i += 1;
	if (i < n)
	{
		res[1][pos] = s[i];
	}
	while (i + 1 < n)
	{
		pos -= 1;
		i += 1;
		res[1][pos] = s[i];
	}

	return res[].map !(x => x.idup).join ("\n");
}

void main ()
{
	string s;
	while ((s = readln.strip) != "")
	{
		int n = cast (int) (s.length);
		foreach (i; 0..n)
		{
			foreach (j; i + 1..n)
			{
				if (s[i] == s[j])
				{
					if (j - i == 1)
					{
						writeln ("Impossible");
					}
					else
					{
						writeln (solve (s, i, j, n));
					}
				}
			}
		}
	}
}
