using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Testing__5
{
class Program
{
static void Main(string[] args)
{
int mid = 0;
int[] mid2 = new int[2];
string flag;
string trash = Console.ReadLine();
int[] stack = new int[trash.Length];
if ((trash.Length % 2) == 0)
{
Newest2 a = new Newest2();
mid2 = a.FindMidofpar(trash);
flag ="hard";
}
else
{
Newest2 a = new Newest2();
mid = a.FindMidofNONpar(trash);
flag ="simple";
}
for(int i = 0; i < trash.Length; i++)
{
stack[i] = Convert.ToInt32(trash[i]);
}
if (flag == "simple")
{
Newest2 a = new Newest2();
Console.WriteLine( a.Do_When_Simple(stack,mid,1));
}
Console.ReadKey();
}
}
class Newest2
{
public int FindMidofNONpar(string i)
{
int j = i.Length;
return ((j / 2 + j % 2) - 1);
}
public int[] FindMidofpar(string i)
{
int j = i.Length;
int[] ret = new int[2];
ret[0] = (j / 2 + j % 2) - 1;
ret[1] = ret[0] + 1;
return ret;
}
public string Do_When_Simple(int[] stack, int mid,int i)
{
if (stack[mid + i] == stack[mid - i]&&(i*2)+1<stack.Length)
{
Do_When_Simple(stack, mid, i++);
}
else if(stack[mid+i] < stack[mid-i]&& (i * 2) + 1 < stack.Length)
{
stack[mid + i] = stack[mid - i];
Do_When_Simple(stack, mid, i++);
}
else if(stack[mid+i]>stack[mid-i]&& (i * 2) + 1 < stack.Length)
{
stack[mid + 1] = stack[mid - 1];
stack[mid + i] = stack[mid - i];
Do_When_Simple(stack, mid, i++);
}
string result=" ";
for(int j = 0; j < stack.Length; j++)
{
result += Convert.ToString(stack[j]);
}
return result;
}
}
}