public static void main(String[] args) throws IOException
    {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        ArrayList<String> list = new ArrayList<String>();
        while (true)
        {
            String s = reader.readLine();
            if (s.isEmpty()) break;
            list.add(s);
        }

        ArrayList<String> listModern = new ArrayList<String>();
        for (int i = 0; i < list.size(); i++)
        {
            String s = list.get(i);
            if (s.length() % 2 == 0) s = s + " " + s;
            else s = s + " " + s + " " + s;
            listModern.add(s);
        }

        for (int i = 0; i < listModern.size(); i++)
        {
            System.out.println(listModern.get(i));
        }
    }