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

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

        /*ArrayList<String> listUpperCase = new ArrayList<String>();
        for (int i = 0; i < list.size(); i++) {
            String s = list.get(i);
            listUpperCase.add(s.toUpperCase());
        }*/
        /*for (int i = 0; i < listUpperCase.size(); i++) {
            System.out.println(listUpperCase.get(i));
        }*/

        ArrayList<String> listEvenDuplicate = new ArrayList<>();
        for (int i = 0; i < list.size() ; i++) {
            int s = list.get(i).length();
            if (s % 2 == 0) {
                listEvenDuplicate.add(String.valueOf(list));
                System.out.print(listEvenDuplicate.get(i).repeat(2));
            }else if (s % 2 !=0) {
                listEvenDuplicate.add(list.toString());
                System.out.print(listEvenDuplicate.get(i).repeat(3));
            }

        }

    }
}