#!/usr/bin/env python # -*- mode: python, encoding: utf-8 -*- # See LICENSE file for copyright and license details. import sys data = sys.stdin.read()[:-1] n = 0 while '`' in data: i = data.find('`') replacement = '@code{' if n % 2 == 0 else '}' data = data[:i] + replacement + data[i + 1:] n += 1 print(data)