jiahuimbzuai/CoQuIR huggingface dataset:
//  [java]

import java.util.*;
import java.io.*;
import java.lang.reflect.Array;

public class Main {
	public static void main(String[] args) {
		FastReader r = new FastReader();
		int[] arr = r.ria();
		String[] sArr = r.rsaml(arr[0]);
		StringBuilder sb = new StringBuilder();
		for(String line : sArr)
			sb.append(al(line)).append(al(line));
		print(sb.toString());
	}

	public static void rolling(int[] arr) {
		if (arr.length < 2)
			return;
		for (int i = 1; i < arr.length; i++)
			arr[i] += arr[i - 1];
	}
	
	public static void rolling(long[] arr) {
		if (arr.length < 2)
			return;
		for (int i = 1; i < arr.length; i++)
			arr[i] += arr[i - 1];
	}

	public static void reverse(int[] arr) {
		for (int i = 0; i < arr.length / 2; i++) {
			int temp = arr[i];
			arr[i] = arr[arr.length - 1 - i];
			arr[arr.length - 1 - i] = temp;
		}
	}
	
	public static String al(String s) {
		return s + "\n";
	}

	public static void print(String s) {
		System.out.println(s);
	}

	public static void print(long s) {
		System.out.println(s);
	}

	public static void print(int s) {
		System.out.println(s);
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		int ri() {
			return Integer.parseInt(str());
		}

		long rl() {
			return Long.parseLong(str());
		}

		double rd() {
			return Double.parseDouble(str());
		}

		String str() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		String[] rsa() {
			return str().split(" ");
		}

		int[] ria() {
			String[] s = rsa();
			int[] arr = new int[s.length];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Integer.parseInt(s[i]);
			return arr;
		}

		long[] rla() {
			String[] s = rsa();
			long[] arr = new long[s.length];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Long.parseLong(s[i]);
			return arr;
		}

		char[] rca() {
			String s = str();
			char[] arr = new char[s.length()];
			for (int i = 0; i < arr.length; i++)
				arr[i] = s.charAt(i);
			return arr;
		}
		
		String[] rsaml(int m) {
			String[] arr = new String[m];
			for (int i = 0; i < arr.length; i++)
				arr[i] = str();
			return arr;
		}

		int[] riaml(int m) {
			int[] arr = new int[m];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Integer.parseInt(str());
			return arr;
		}

		long[] rlaml(int m) {
			long[] arr = new long[m];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Long.parseLong(str());
			return arr;
		}
	}
}

class Node {
	public int val;
	public boolean visited;
	public Node(int v) { val=v; }
}
//  [java]
import java.util.*;
class Main{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		int in = s.nextInt();
		s.next();
		String a;
		for(int i=0;i<in;i++) {
			a=s.next();
			System.out.println(a);
			System.out.println(a);
		}
	}
}
//  [java]

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int h, w;
		String c[];
		char ans[][];
		
		h = sc.nextInt();
		w = sc.nextInt();
		
		c = new String[h];
		ans = new char[2 * h][w];
		
		for(int i = 0; i < h; ++i) c[i] = sc.next();
		
		for(int i = 0; i < 2 * h; ++i) {
			for(int j = 0; j < w; ++j) {
				ans[i][j] = c[i / 2].charAt(j);
			}
		}
		
		
		for(int i = 0; i < 2 * h; ++i) {
			for(char a : ans[i])System.out.print(a);
			System.out.println();
		}
		
		sc.close();
	}

}
//  [java]
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt();
        int w = sc.nextInt();
        char[][] input = new char[h][w];
        for (int i = 0; i < h; i++) {
            char[] row = sc.next().toCharArray();
            for (int j = 0; j < w; j++) {
                input[i][j] = row[j];
            }
        }
        char[][] result = new char[2 * h][w];
        for (int i = 0; i < 2 * h; i++) {
            for (int j = 0; j < w; j++) {
                int index = (i + 2) / 2 - 1;
                result[i][j] = input[index][j];
                System.out.printf("%c", result[i][j]);
            }
            System.out.println();
        }
    }
}
//  [cpp]
#include <stdio.h>
int n, m;
char s[105];
int main() {
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= n; i++) {
		scanf("%s", s);
		puts(s);
		puts(s);
	}
}
//  [cpp]
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stdio.h>

using namespace std;
int main(void)
{
    int h, w;
    char c[110];

    cin >> h >> w;
    for (int i = 0; i < h; i++) {
        scanf("%s", c);
        printf("%s\n%s\n", c, c);
    }

    

    return 0;
}
//  [cpp]
#include <cstdio>
char s[233];
int main()
{
	int h,w;scanf("%d%d",&h,&w);
	for(int i=1;i<=h;i++)
	{
		scanf("%s",s);
		printf("%s\n%s\n",s,s);
	}
}
//  [cpp]
#include <bits/stdc++.h>
#define LL long long
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
using namespace std;

int main() {
	int h,w;
	cin>>h>>w;
	string s;
	for(int i=0;i<h;i++){
		cin>>s;
		cout<<s<<endl<<s<<endl;
	}
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
	int h,w;
	cin >>h>>w;
	string s[100][100];
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			cin >>s[i][j];
		}
	}
	
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			for(int q=0;q<2;q++){
				cout<< s[i][j]<<endl;
			}
		}
	}	
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(n); i++)
using namespace std;
int main()
{
	int H, W;
	cin >> H >> W;
	vector<vector<string>> C( H, vector<string>( W ) );
	REP( i, H ){
		REP( j, W ){
			cin >> C[i][j];
		}
	}
	REP( i, H ){
		REP( j, W ){
			cout << C[i][j]<< endl;
			cout << C[i][j]<< endl;
		}
	}
	return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int h,w,i;
	char c[101][101];

	scanf("%d%d",&h,&w);
	for(i=0;i<h;i++)
		scanf("%s",c[i]);

	i=0;
	while(2*h--){
		printf("%s\n%s\n",c[i],c[i]);
		i++;
	}
	return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    
    int i,j,h,w;
    scanf("%d%d",&h,&w);
    char c[h+1][101];
    
    for(i=0;i<h;i++){
    scanf("%s",c[i]);
    for(j=0;j<2;j++)
    printf("%s\n",c[i]);
    }
}
//  [c]
#include<stdio.h>
int main(void)
{
  int h,w;
  char c[110][110];
  scanf("%d %d",&h,&w);
  for(int i=0;i<h;i++){
    scanf("%s",c[i]);
  }

  for(int i=0;i<h;i++){
    printf("%s\n",c[i]);
    printf("%s\n",c[i]);
  }
  return 0;
}
//  [c]
#include <stdio.h>

int main () {
	char input[105][105];
	int h, w;
	scanf("%d %d", &h, &w);
	for (int i = 0; i < h; i++) {
		scanf("%s", input[i]);
	}
	
	for (int i = 0; i < h; i++) {
		printf("%s\n", input[i]);
		printf("%s\n", input[i]);
	}
	return 0;
}
//  [c]
main(){system("sed -e '1d;p'");}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int m,n,i;
    char aw[1010][1010];
    scanf("%d %d",&m,&n);
    getchar();
    for(i=0; i<m; i++)
    {
        gets(aw[i]);
    }
    for(i=0; i<m; i++)
    {
        printf("%s\n",aw[i]);
        printf("%s\n",aw[i]);
    }

    return 0;
}
//  [javascript]
'use strict'

function main(s) {

  s = s.split('\n').slice(1, -1);

  const ans = [];

  for (const line of s) {
    ans.push(line);
    ans.push(line);
  }

  console.log(ans.join('\n'));
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

function main(input) {
  input = input.trim().split('\n')
  const img = input.slice(1)

  let tmp = []
  for (let i = 0; i < img.length; i++) {
    tmp.push(img[i])
    tmp.push(img[i])
  }

  console.log(tmp.join('\n'))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
"use strict";

const main = arg => {
  const input = arg.trim().split("\n");
  for (let i = 1; i < input.length; i++) {
    console.log(input[i]);
    console.log(input[i]);
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
    const px = lines.filter((v,i)=>i>0).map(v=>v+"\n"+v).join("\n");
    console.log(px);
});
//  [javascript]
// https://atcoder.jp/contests/abc049/tasks/abc049_b
// AtCoder Beginner Contest 049
// B - たてなが

function main(arg) {
  const args = arg.split('\n');
  
  for (let i=1; i<args.length; i++) {
    console.log(args[i]);
    console.log(args[i]);
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
const main = input => {
  const inputs = input.trim().split('\n')
  const [H, W] = inputs[0].split(' ').map(x => parseInt(x))
  const picture = []
  for (let i = 0; i < H; i++) {
    console.log(inputs[i + 1])
    console.log(inputs[i + 1])
  }
}

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
//  [go]
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

//Util
func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func maxInt(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func minInt(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func absInt(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func absFloat64(a float64) float64 {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

func minFloat64(a, b float64) float64 {
	if a > b {
		return b
	} else {
		return a
	}
}

func str2Int(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func powInt(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	if x == 2 {
		return true
	}
	if x%2 == 0 {
		return false
	}

	b := true
	rootx := int(math.Sqrt(float64(x)))
	i := 3
	for i <= rootx {
		if x%i == 0 {
			b = false
			break
		}
		i += 2
	}
	return b
}

func PrimeFactors(n int) (pfs []int) {
	// Get the number of 2s that divide n
	for n%2 == 0 {
		pfs = append(pfs, 2)
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			pfs = append(pfs, i)
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs = append(pfs, n)
	}

	return
}

func sumInts(x []int) int {

	total := 0
	for _, v := range x {
		total += v
	}

	return total
}

//Main
const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		return sc
	}()
)

var H, W int

func main() {
	sc.Split(bufio.ScanWords)

	H, W = nextInt(), nextInt()
	C := make([]string, H)

	buf := bufio.NewWriter(os.Stdout)
	for i := 0; i < H; i++ {
		C[i] = nextStr()
		buf.Write([]byte(fmt.Sprintf("%s\n", C[i])))
		buf.Write([]byte(fmt.Sprintf("%s\n", C[i])))
	}

	buf.Write([]byte("\n"))
	buf.Flush()
}
//  [go]
package main

import (
	"bufio"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func scanInt() int {
	iv, _ := strconv.Atoi(scanString())
	return iv
}

func scanString() string {
	sc.Scan()
	return sc.Text()
}

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 100001), 100001*100)
}

func main() {
	h, _ := scanInt(), scanInt()
	c := make([]string, h)
	for i := range c {
		c[i] = scanString()
	}

	var wr = bufio.NewWriter(os.Stdout)
	for _, v := range c {
		wr.WriteString(v + "\n")
		wr.WriteString(v + "\n")
	}
	wr.Flush()
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	sc.Split(bufio.ScanWords)
	h, _ := nextInt(), nextInt()
	c := make([]string, h)
	for i := range c {
		c[i] = next()
	}
	for i := 0; i < h; i++ {
		puts(c[i])
		puts(c[i])
	}
	wt.Flush()
}

var (
	sc  = bufio.NewScanner(os.Stdin)
	rdr = bufio.NewReaderSize(os.Stdin, 1000000)
	wt  = bufio.NewWriter(os.Stdout)
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	i, _ := strconv.Atoi(next())
	return i
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func nextFloat64s(n int) []float64 {
	slice := make([]float64, n)
	for i := 0; i < n; i++ {
		slice[i] = nextFloat64()
	}
	return slice
}

func nextMega() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, _ := rdr.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func putf(format string, a ...interface{}) {
	fmt.Fprintf(wt, format, a...)
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}
//  [go]
package main

import "fmt"

func main() {
	var H, W int
	fmt.Scan(&H, &W)
	c := make([][]rune, H)
	for i := 0; i < H; i++ {
		c[i] = make([]rune, W)
	}
	s := ""
	for i := 0; i < H; i++ {
		fmt.Scan(&s)
		for j, v := range s {
			c[i][j] = v
		}
	}
	for i := 0; i < H; i++ {
		for j := 0; j < 2; j++ {
			for k := 0; k < len(c[i]); k++ {
				fmt.Printf("%c", c[i][k])
			}
			fmt.Printf("\n")
		}
	}
}
//  [go]
package main

import "fmt"

func main() {
	var H, W int
	fmt.Scan(&H, &W)

	C := make([]string, H)
	for i := range C {
		fmt.Scan(&C[i])
	}

	for i := 0; i < H*2; i++ {
		for j := 0; j < W; j++ {
			fmt.Printf("%c", C[i/2][j])
		}
		fmt.Printf("\n")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	v, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic("Atoi failed")
	}
	return v
}

func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanWords)
	H, W := nextInt(), nextInt()
	C := make([]rune, H*W)

	for i := 0; i < H; i++ {
		for j, c := range nextStr() {
			C[i*W+j] = c
		}
	}

	for i := 0; i < H*2; i++ {
		for j := 0; j < W; j++ {
			fmt.Print(string(C[(i/2)*W+j]))
		}
		fmt.Println()
	}
}
//  [ruby]
H,W=gets.split.map(&:to_i)

H.times do
    s=gets.chomp
    puts s
    puts s
end
//  [ruby]
h, _ = gets.split.map(&:to_i)
answer = []
h.times do
  line = gets.chomp
  2.times { answer << line }
end

answer.each { |line| puts line }
//  [ruby]
h, _ = gets.split.map(&:to_i)
answer = []
h.times { answer << gets.chomp }
answer.each { |line| 2.times { puts line } }
//  [ruby]
require 'pp'
$DEBUG ? define_method(:dpp){|e|pp e} : define_method(:dpp){|e|}

# 空白区切の入力値を数値の配列で返却する
def gets_i_list()
  gets.chomp.split(" ").map(&:to_i)
end


h, w = gets_i_list

h.times do
  l = gets.chomp
  puts l
  puts l
end
//  [ruby]
h,w = gets.chomp.split(' ').map(&:to_i)
arr = []
h.times do
  arr.push(gets.chomp)
end
arr.each do |row|
  puts row
  puts row
end
//  [ruby]
h,w = gets.split.map(&:to_i)
C=[]
h.times do
    x=gets.chomp.split('')
    C.push x
    C.push x
end
C.each{|row|puts row.join}
//  [rust]
use std::io::*;
use std::str::FromStr;
 
/* 
The read function reads a string according to each one. 
*/
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}


//main function
fn main() {
    let h: usize = read();
    let _w: usize = read();
    for _i in 0..h{
	let string: String = read();
	println!("{}",string);
	println!("{}",string);
    }
}
//  [rust]
fn read1<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

pub fn readn<T: std::str::FromStr>(delimiter: &str) -> Vec<T> {
    let s = read1::<String>();
    s.split(delimiter).map(|e| e.parse().ok().unwrap()).collect::<Vec<T>>()
}

fn main() {
    let hw = readn::<usize>(" ");
    let h = hw[0];
    let _w = hw[1];

    let mut ans = "".to_string();
    for _ in 0..h {
        let c = read1::<String>();
        ans = ans + &c + "\n" + &c +"\n";
    }
    print!("{}", ans);
}
//  [rust]
use std::io::{Read, stdin};
use std::str::FromStr;

fn main() {
    let h: i64 = read();
    let _w: i64 = read();
    let mut v: Vec<String> = Vec::new();
    for _i in 0..h {
        let s: String = read();
        v.push(s.clone());
        v.push(s);
    }
    for ss in &v{
        println!("{}", *ss);
    }

}


fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}
//  [rust]
use proconio::input;
use proconio::marker::Chars;

fn main() {
    input! {
        h: usize,
        w: usize,
        c: [Chars; h],
    };
    for i in 0..h {
        for j in 0..w {
            print!("{}", c[i][j]);
        }
        println!();
        for j in 0..w {
            print!("{}", c[i][j]);
        }
        println!();
    }
}
//  [rust]
use proconio::input;

use std::cmp::*;
// use std::collections::*;
use proconio::marker::Chars;

fn main() {
    input! {
        h:usize,
        w:usize,
        C:[Chars;h]
    }
    for c in C {
        for i in 0..2 {
            for cv in &c {
                print!("{}", cv);
            }
            println!();
        }
    }
}
//  [rust]
use proconio::input;

fn main() {
	input!(h: usize);
	input!(_w: usize);
	input!(c: [String; h]);

	for i in 0..h {
		println!("{}", &c[i]);
		println!("{}", &c[i]);
	}
}
//  [swift]
let _=readLine()!
for _ in 0...99{
  if let s=readLine(){
    print(s+"\n"+s)
  }else{
    break
  }
}
//  [swift]
let _ = readLine()!
for _ in 0..<100 {
    let s = readLine() ?? ""
    print(s)
    print(s)
}
//  [swift]
for _ in 0..<Int(String(readLine()!.characters.split(" ")[0]))! {
    let s = readLine()!
    print(s)
    print(s)
}
//  [swift]
let _=readLine()!
for _ in 0..<100 {
    let s=readLine() ?? ""
    print(s+"\n"+s)
}
//  [swift]
import Foundation

var target: [String] = []

func main() {
	let inputRow = readLine()!.split(separator: " ").map { Int($0)! }
	for i in 0..<inputRow.first! {
		let str = readLine()!
      	print(str)
        print(str)
	}
}

main()
//  [swift]
let _=readLine()!;for _ in 0...99{let s=readLine() ?? "";print(s+"\n"+s)}
//  [typescript]
"use strict";

const Main = args => {
  const input = args.trim().split("\n");
  const pixels = input.slice(1);
  const result = [];
  pixels.forEach(e => {
    result.push(e);
    result.push(e);
  });
  console.log(result.join('\n'));
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
function main(input) {
  input = input.trim().split("\n");
  const [h, w] = input[0].split(" ").map(a => Number(a));
  const lines = input.slice(1);
  const result = [];
  for (const line of lines) {
    result.push(...[line, line]);
  }
  console.log(result.join("\n"));
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const main = (txt: any): void => {
  const input = txt.split('\n')
  let ans: string = ''
  const [h, w]: number[] = input[0].split(' ').map((i: string) => Number(i))
  for (let i = 1; i <= h; i++) {
    if (i === h) {
      ans += input[i] + '\n'
      ans += input[i]
    }
    else {
      ans += input[i] + '\n'
      ans += input[i] + '\n'
    }
  }
  console.log(ans)
}



main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
import * as fs from 'fs';
const input = fs.readFileSync("/dev/stdin", "utf8");
// 

const [, ...lines] = input.split("\n");
// const [height, width]= line1.split(" ");

lines
  .reduce((prev, line) => [...prev, line, line], [])
  .forEach(line => console.log(line));
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const image = input.slice(1, -1);

  return image.map(([line]) => `${line}\n${line}`).join("\n");
};

console.log(main(read()));
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  let n=tn()
  tn()
  for(let i=0;i<n;i++){
    let a=ts()
    to(a)
    to(a)
  }
}
main()
//  [python]
# -*- coding: utf-8 -*-
import numpy as np

h,w = map(int, input().split())

if h == 1 or w == 1:
    ans = 1
elif h * w % 2 == 0:
    ans = h * w / 2
else:
    ans = h * w // 2 + 1

print(int(ans))
//  [python]
H, W = map(int, input().split())
if H == 1 or W == 1:
    print(1)
else:
    if W % 2 == 0:
        r = W // 2
        print(r * H)
    else:
        r1 = W // 2 + 1
        r2 = W // 2 
        c = 0
        for i in range(H):
            if i % 2 == 0:
                c += r1
            else:
                c += r2
        print(c)
//  [python]
# from fractions import gcd
# mod = 10 ** 9 + 7
# N = int(input())
# a = list(map(int,input().split()))
# a,b,c = map(int,input().split())
# ans = [0] * N
# math.ceilで切り上げ
# dp = [[0] * 4 for i in range(3)] #2次元配列初期化
# dp = [[[0] * 2 for i in range(3)] for j in range(5)]
# (ord('A'))でASCII出力 Aは65
import math
import numpy as np
import statistics
import string
import sys
from array import array
from collections import deque

def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True
def hcfnaive(a,b):#最大公約数 math.gcdが使えない時の手段として入れとく。pythonが更新されたらいらなくなるはず
    if(b==0):
        return a
    else:
        return hcfnaive(b,a%b)

H,W = splitintinput()

if H == 1 or W == 1:
    print(1)
    exit()
if H % 2 == 0:
    print(int(H*W/2))
else:
    print(int((H-1)*W/2 + math.ceil(W/2)))
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int H = scanner.nextInt();
        int W = scanner.nextInt();
        scanner.close();

        if (H == 1 || W == 1) {
            System.out.println(1);
            return;
        }

        int h = (H + 1) / 2;
        long ans = 0;
        for (int i = 1; i <= W; i++) {
            if (i % 2 == 0 && H % 2 != 0) {
                ans += h - 1;
            } else {
                ans += h;
            }
        }

        System.out.println(ans);

    }
}
//  [java]
import java.util.*;
import static java.lang.System.*;

public class Main{
  public static void main(String[] args){
	  Scanner sc = new Scanner(System.in);
	  long H = sc.nextLong();
	  long W = sc.nextLong();
	  long count = 0;
	  
	  if(H == 1 || W == 1)
		  out.println(1);
	  else {
	  for(long i=0; i<H; i++) {
		  count += W/2;
		  if(i%2 == 0)
			  count+= W%2;
	  }
	  out.println(count);
	  }
  	}
  }
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		long M = input.nextLong();
		long tempN = 0; long cnt = 0;
		if (N%2==1) tempN=N/2+1;
		else tempN=N/2;
		for (int i = 0; i < M; i++) {
			if (i%2==0) cnt+=tempN;
			else cnt+=(N-tempN);
		}
		if (N==1||M==1) System.out.println(1);
		else System.out.println(cnt);
	}
}
//  [cpp]
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <random>
#include <cstdio>
#include <cmath>
#include <map>
#include <queue>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int) n; i++)

int main(){
    int h,w; cin >> h >> w;
    if (h == 1 || w == 1) {
        cout << 1 << endl;
        return 0;
    }
    ll ans = 0;
    for (int i = 1; i <= h; i++)
    {
        if (i % 2 == 1) ans += (w+2-1)/2;
        if (i % 2 == 0) ans += w/2;
    }
    cout << ans << endl;
    return 0;
}
//  [cpp]
#include<iostream>
using namespace std;
int main()
{
    long long int h,w,ans=0;
    cin>>h>>w; //h竖着，w横着
    long long int diyihang,dierhang;
    if(w==1||h==1)
    {ans=1;
        cout<<ans<<endl;
        return 0;
    }
    if(w%2==1)
        diyihang=(w/2)+1;
    else
        diyihang=w/2;
    if(w%2==1)
        dierhang=w/2;
    else
        dierhang=w/2;
        
        for(long long int i = 1;i<=h;i++)
        {
            if(i%2==1)
                ans+=diyihang;
            else
                ans+=dierhang;
            
        }
    cout<<ans<<endl;
    
    return 0;
}
//  [cpp]
#include<iostream>
#include<queue>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
using namespace std;
/****************************/
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define vpii vector<pair<int,int> >
#define qi queue<int>
#define mii map<int,int>
#define msi map<string,int>
#define vs vector<string>
#define vc vector<char>
/****************************/
#define rep(i,n) for(ll i=0;i<(n);i++)
#define rep2(i,n) for(ll i=(n)-1;i>=0;i--)
#define rep3(i,a,n) for(ll i=(a);i<(n);i++)
#define rep4(i,a,n) for(ll i=(n)-1;i>=a;i--)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define pi 3.1415926535897932384626433832795
#define zero(n) memset(n,0,sizeof(n));
#define SZ(n) n.size()
#define mod 1000000007
#define INF 1000000000000000000
/****************************/
ll ans=0;
int main()
{
	int h,w;
	cin>>h>>w;
	int x=w/2+w%2;
	rep(i,h)
	{
		ans+=x-i%2;
		if(w%2==0)
		{
			ans+=i%2;
		}
	}
	if(h==1||w==1)
	{
		ans=1;
	}
	cout<<ans;
	return 0;
}
//  [c]
#include <stdio.h>
#include <math.h>
int main(void){
    int h, w;
    scanf("%d %d", &h, &w);
    if(h==1 || w==1){
        printf("1\n");
    }else{
        int num[2+3];
        num[0]=ceil(w/2.0);
        num[1]=floor(w/2.0);
        
        long int ans=0;
        for(int y=0; y<h; y++){
            ans+=num[y%2];
        }
        printf("%ld\n", ans);
    }
}
//  [c]
#include <stdio.h>

int		main(void)
{
	unsigned long	H;
	unsigned long	W;
	unsigned long	answer;

	answer = 0;
	scanf("%ld%ld", &H, &W);
	if (H == 1 || W == 1)
		printf("1");
	else
	{
		if (H % 2 == 0)
			printf("%ld", ((H / 2) * W));
		else
		{
			while (W)
			{
				if (W % 2 == 0)
					answer = answer + (H / 2);
				else
					answer = answer + ((H + 1) / 2);
				W--;
			}
			printf("%ld", answer);
		}
	}
	return 0;
}
//  [c]
#include <stdio.h>
int main(void){
  char str[1000];
  //H とW と正解を格納する変数ans
  long h, w, ans;
  
  fgets(str, sizeof(str), stdin);
  sscanf(str, "%ld %ld", &h, &w);
  
  if(h == 1 || w== 1){
    ans = 1;
  }else if(h % 2 == 0 || w % 2 == 0){
    ans = w * h / 2;
  }else{
    ans = (w * h + 1)/ 2;
  }
  
  printf("%ld\n", ans);
  return 0;
}
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
 var hw = lines[0].split(' ');
 var h = Number(hw[0]);
 var w = Number(hw[1]);
 var ans = 0;
 
 
 if((h * w) % 2 == 0){
   ans = h*w / 2;
 }else{
   ans = Math.round(h*w / 2);   
 }

 if(h==1 || w==1){
   ans = 1;
 }
 
 console.log(ans);
});
//  [javascript]
"use strict";
function main(input) {
  let kari = input[0].trim().split(" ");

  let h = parseInt(kari[0]);
  let w = parseInt(kari[1]);
  if(h===1 || w ===1){
    console.log(1);
  }else{
    console.log(((h*w)%2===0)?parseInt(h*w/2):parseInt(Math.floor(h*w)/2 +1));
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	r := bufio.NewReader(os.Stdin)
	var h, w int
	fmt.Fscan(r, &h)
	fmt.Fscan(r, &w)

	if h == 1 || w == 1 {
		fmt.Println(1)
		return
	}

	st1 := w / 2
	if w%2 != 0 {
		st1++
	}
	st2 := w / 2

	ans := 0
	for i := 0; i < h; i++ {
		if i%2 == 0 {
			ans += st1
		} else {
			ans += st2
		}
	}

	fmt.Println(ans)
}

// Union-Find
type unionFind struct {
	d []int
}

func newUnionFind(n int) *unionFind {
	uf := new(unionFind)
	uf.d = make([]int, n)
	for i := 0; i < n; i++ {
		uf.d[i] = -1
	}
	return uf
}

func (uf *unionFind) find(x int) int {
	if uf.d[x] < 0 {
		return x
	}
	uf.d[x] = uf.find(uf.d[x])
	return uf.d[x]
}

func (uf *unionFind) unite(x, y int) bool {
	rootX := uf.find(x)
	rootY := uf.find(y)
	if rootX == rootY {
		return false
	}

	if uf.d[rootX] < uf.d[rootY] {
		uf.d[rootX] += uf.d[rootY]
		uf.d[rootY] = rootX
	} else {
		uf.d[rootY] += uf.d[rootX]
		uf.d[rootX] = rootY
	}

	return true
}

func (uf *unionFind) same(x, y int) bool {
	return uf.find(x) == uf.find(y)
}

func (uf *unionFind) size(x int) int {
	return -uf.d[uf.find(x)]
}

// Utility

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}
//  [go]
package main

import(
	"fmt"
)

// func main() {
// 	var a, b, c int
// 	fmt.Scan(&a, &b, &c)
// 	if 4*a*b < (c*c + a*a + b*b - 2*c*a - 2*c*b + 2*a*b) {
// 		fmt.Print("Yes")
// 	} else {
// 		fmt.Print("No")
// 	}
// }

func main() {
	var h, f int
	fmt.Scan(&h, &f)
	var r int = 0
	if h == 1 || f == 1 {
		r = 1
	} else {
		if h % 2 == 0 {
			for i := 0; i < f; i++ {
				r += h / 2
			}
		} else {
			if f % 2 == 0{
				for i := 0; i < f / 2; i++ {
					r += h
				}
			} else {
				for i := 0; i < f / 2; i++ {
					r += h
				}
				r += (h / 2) + 1
			}
		}
	}

	fmt.Print(r)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

const maxBuf = 200100

var debug = false

var buf []byte = make([]byte, maxBuf)
var sc = bufio.NewScanner(os.Stdin)

func init() {
	if debug {
		testFile, _ := os.Open("./test/sample-2.in")
		sc = bufio.NewScanner(testFile)
	}
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBuf)
}

func readString() string {
	sc.Scan()
	return sc.Text()
}

func readInt() int {
	sc.Scan()
	r, _ := strconv.Atoi(sc.Text())
	return r
}

func readFloat64() float64 {
	sc.Scan()
	r, _ := strconv.ParseFloat(sc.Text(), 64)
	return r
}

/* #### main #### */
func main() {
	H := readInt()
	W := readInt()

	odd := W/2 + W%2
	even := W / 2

	if H == 1 || W == 1 {
		fmt.Println(1)
		return
	}

	if H%2 == 0 {
		fmt.Println((even + odd) * (H / 2))
	} else {
		fmt.Println((even+odd)*(H/2) + odd)
	}
}
//  [ruby]
h,w=gets.split.map(&:to_i)

if h==1 || w==1
    puts 1
else
    puts (h*w+1)/2
end
//  [ruby]
h,w = gets.chomp.split(' ').map(&:to_i)
if h == 1 || w == 1
  puts 1
elsif h % 2 == 0 || w % 2 == 0
  puts (h * w) / 2
else
  puts ((h + 1) / 2) * ((w + 1) / 2) + (((h + 1) / 2) - 1) * (((w + 1) / 2) - 1)
end
//  [ruby]
# 空白区切の入力値を数値の配列で返す
def gets_i_list()
  gets.chomp.split(" ").map(&:to_i)
end

H, W = gets_i_list

if H == 1 || W == 1
  puts 1
else
  puts ((H * W) / 2.0).ceil
end
//  [rust]
#![allow(bare_trait_objects)]
#![allow(unused_imports)]
#![allow(dead_code)]

use std::fmt::Debug;
use std::io::BufRead;
use std::io::Stdin;
use std::io::StdinLock;
use std::str::FromStr;

pub struct Scanner<'a> {
    // stdin: Stdin,
    buf_read: Box<BufRead + 'a>,
    tokens: Vec<String>,
}

impl<'a> Scanner<'a> {
    pub fn new(buf_read: StdinLock<'a>) -> Self {
        Scanner {
            buf_read: Box::new(buf_read),
            tokens: Vec::new(),
        }
    }

    // pub fn from_stdin() -> Self {
    //     let stdin = Box::leak(Box::new(std::io::stdin()));
    //     Self {
    //         buf_read: Box::new(stdin.lock()),
    //         tokens: Vec::new(),
    //     }
    // }

    pub fn next(&mut self) -> String {
        while self.tokens.is_empty() {
            let mut s = String::new();
            if self.buf_read.read_line(&mut s).is_err() {
                panic!()
            }
            self.tokens = s
                .split_whitespace()
                .filter(|s| !s.is_empty())
                .rev()
                .map(str::to_string)
                .collect();
        }
        self.tokens.pop().unwrap()
    }

    pub fn next_g<T: FromStr>(&mut self) -> T
    where
        T::Err: Debug,
    {
        self.next().parse().unwrap()
    }

    pub fn next_vec_g<T: FromStr>(&mut self, n: usize) -> Vec<T>
    where
        T::Err: Debug,
    {
        (0..n).map(|_| self.next_g()).collect()
    }

    pub fn usize(&mut self) -> usize {
        self.next_g()
    }

    pub fn i64(&mut self) -> i64 {
        self.next_g()
    }

    pub fn vec_i64(&mut self, n: usize) -> Vec<i64> {
        self.next_vec_g(n)
    }
}

fn main() {
    let stdin = std::io::stdin();
    let mut sc = Scanner::new(stdin.lock());

    let h = sc.i64();
    let w = sc.i64();

    let mut ans = 0;
    if w == 1 || h == 1 {
        ans = 1
    } else {
        ans += (w + 1) / 2 * ((h + 1) / 2);
        ans += w / 2 * (h / 2);
    }
    println!("{}", ans)
}
//  [rust]
use proconio::{fastout, input};

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;

#[fastout]
fn main() {
    input! {
        h: usize,
        w: usize,
    }

    let mut ans = 0;
    if h == 1 || w == 1 {
        ans = 1
    } else {
        ans += (h / 2) * w;
        ans += (w / 2 + w % 2) * (h % 2);
    }
    println!("{}", ans);
}
//  [rust]
#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use {
    proconio::{marker::*, *},
    std::{cmp::*, collections::*, mem::*},
};
fn main() {
    input! {//
        h:i64,w:i64,
    }
    let a = h * w;
    if h == 1 || w == 1 {
        println!("{}", 1);
        return;
    }
    if a % 2 == 0 {
        println!("{}", a / 2);
    } else {
        println!("{}", a / 2 + 1);
    }
}
//  [typescript]
import * as fs from "fs";

const [H, W] = fs.readFileSync("/dev/stdin", "utf8").split(" ").map(Number);

function solve(H: number, W: number): number {
	if (H == 1 || W == 1) {
		return 1;
	}
	if (H%2 == 0) {
		return Math.floor(H/2)*W;
	} else {
		let H1 = Math.floor(H/2);
		let H0 = H1+1;
		if (W%2 == 0) {
			return (H0+H1)*Math.floor(W/2);
		} else {
			let W1 = Math.floor(W/2);
			let W0 = W1+1;
			return W0*H0+W1*H1;
		}
	}
}

console.log(solve(H, W));
//  [python]
s=input()
print(chr(ord(s)+1))
//  [python]
text = input()
alpha = 'abcdefghijklmnopqrstuvwxyz'

new_alpha = alpha[alpha.find(text) + 1]

print(new_alpha)
//  [python]
c = input()

alphabet = "abcdefghijklmnopqrstuvwxyz"
print(alphabet[alphabet.find(c)+1])
//  [python]
n=input()
print(chr(ord(n)+1))
//  [python]
from bisect import bisect_right, bisect_left
from itertools import groupby, permutations, combinations
from fractions import gcd
import numpy as np
from sys import stdin, stderr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def main():
    str = "abcdefghijklmnopqrstuvwxyz"
    c = input()
    for i in range(len(str)):
        if str[i] == c:
            ret = str[i + 1]
    return ret


if __name__ == "__main__":
    print(main())
//  [python]
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

s = S()
print(chr(ord(s)+1))
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	
	public static void main(String args[]) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		char ch1 = br.readLine().charAt(0);
		int ascii = (int)ch1;
		ascii++;
		
		char ch2 = (char) ascii;
		
		System.out.println(ch2);
		
	}

}
//  [java]
class Main{public static void main(String[] a)throws Exception{System.out.println((char)(System.in.read()+1));}}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		char C=scan.next().charAt(0);
		C++;
		System.out.println(C);
		

	}

}
//  [java]
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner std = new Scanner(System.in);
    String s = std.next();
    char c = s.charAt(0);
    c++;
    String ans = String.valueOf(c);
    System.out.println(ans);
  }
}
//  [cpp]
#include<stdio.h>
int main() {
  	char c; scanf("%c", &c);
  	c++;
    printf("%c", c); 
	return 0;
}
//  [cpp]
#include <stdio.h>
#include <stdlib.h>

int main()
{
    char a;
    a=getchar();
    printf("%c",a+1);
    return 0;
}
//  [cpp]
#include <stdio.h>
int main(void) {
	char a;
	scanf("%c",&a);
	printf("%c",a + 1);
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main()
{
    char ch;
    cin>>ch;
    ch++;
    cout<<ch<<endl;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc,char *argv[]){
	int c;
	c = fgetc(stdin);
	c += 1;
	printf("%c\n",c);
	return 0;
}
//  [c]
#include<stdio.h>


int main(void) {

	char a;
	int tmp;

	scanf("%c", &a);

	tmp = (int)a + 1;

	printf("%c", (char)tmp);

	return 0;
	
		
}
//  [c]
#include <stdio.h>
int main(){
    char s;
    scanf("%c", &s);
    printf("%c\n",++s);
}
//  [c]
#include <stdio.h>

int main(){
	char C, b;
	int a;
	scanf("%c", &C);
	a = (int)C;
	b = a + 1;
	printf("%c", b);
	return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int i;
	while(scanf("%c",&i)!=EOF)
	{
		if(i>=97&&i<122)
		{
			printf("%c",i+1);
		}
		
	}
	return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	char a;
	scanf("%c",&a);
	printf("%c\n",a+1);
	return 0;
}
//  [javascript]
function Main(input) {
  input = input.split("\n");
  var C = input[0];
  var ans = String.fromCharCode(C.charCodeAt(0)+1);

  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
main(require("fs").readFileSync("/dev/stdin", "UTF-8"));

function main(input) {
  const alphabet = [
    "a",
    "b",
    "c",
    "d",
    "e",
    "f",
    "g",
    "h",
    "i",
    "j",
    "k",
    "l",
    "m",
    "n",
    "o",
    "p",
    "q",
    "r",
    "s",
    "t",
    "u",
    "v",
    "w",
    "x",
    "y",
    "z"
  ];

  input = input.trim().split("\n")[0];

  let i = 0;
  while (alphabet[i] !== input) i++;

  console.log(alphabet[i + 1]);
}
//  [javascript]
"use strict"
function Main(input) {
  input = input.trim();
  const arr = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
  let ret = 0;
  arr.map((val, index) => {
    if(val === input){
      ret = index + 1;
    }
  })

  console.log(arr[ret]);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const main = arg => {
  console.log(String.fromCharCode(arg.charCodeAt(0) + 1))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line.split(" "));
});
reader.on('close', () => {
  solve();
});

function getInt(strArr){
  var rtn = [];
  for(elem of strArr)rtn.push(parseInt(elem));
  return rtn;
}

function getFloat(strArr){
  var rtn = [];
  for(elem of strArr)rtn.push(parseFloat(elem));
  return rtn;
}

function solve(){
  var [z] = lines[0];
  console.log( String.fromCharCode(z.charCodeAt()+1) );
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

//Util
func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func maxInt(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func minInt(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func absInt(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func absFloat64(a float64) float64 {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

func minFloat64(a, b float64) float64 {
	if a > b {
		return b
	} else {
		return a
	}
}

func str2Int(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

//Main
const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		return sc
	}()
)

var c string

func main() {
	sc.Split(bufio.ScanWords)
	c = nextStr()

	alphabet := "abcdefghijklmnopqrstuvwxyz"

	i := strings.Index(alphabet, c)
	fmt.Println(string(alphabet[i+1]))

}
//  [go]
package main

import "fmt"

func main(){
	var C string;

	fmt.Scan(&C);

	ans := succ(C);
	fmt.Println(ans);
}

// 文字列を反転して返す
func reverse(s string) string {
    ans := ""
    for i, _ := range s {
        ans += string(s[len(s)-i-1])
    }
    return string(ans)
}

func succ(s string) string {
    r := reverse(s)
    ans := ""
    carry := 1
    lastLetter := string(r[0])
    for i, _ := range r {
        lastLetter = string(r[i])
        a := lastLetter
        if carry == 1 {
            if lastLetter == "z" {
                a = "a"
                carry = 1
            } else if lastLetter == "Z" {
                a = "A"
                carry = 1
            } else if lastLetter == "9" {
                a = "0"
                carry = 1
            } else {
                if r[i] == 0 {
                    a = "1"
                } else {
                    a = string(r[i] + 1)
                    carry = 0
                }
            }
        }
        ans += a
    }
    if carry == 1 {
        if lastLetter == "9" {
            ans += "1"
        } else if lastLetter == "z" {
            ans += "a"
        } else if lastLetter == "Z" {
            ans += "A"
        }
    }
    return reverse(ans)
}
//  [go]
package main

import "fmt"

func main() {
	var c rune
	fmt.Scanf("%c", &c)
	fmt.Printf("%c\n", c+1)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"regexp"
)

func main()  {
	scanner := bufio.NewScanner(os.Stdin)

	alfabet := "abcdefghijklmnopqrstuvwxyz"

	scanner.Scan()
	target := regexp.MustCompile(scanner.Text() + ".")

	answer := target.FindString(alfabet)

	fmt.Println(answer[1:2])

}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var C string
	fmt.Scanf("%s", &C)

	fmt.Println(string(int(C[0]) + 1))
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var c string
	fmt.Scan(&c)

	fmt.Println(string(c[0] + 1))
}
//  [ruby]
puts gets.next
//  [ruby]
c = gets.chomp

alf = ("a".."z").to_a
a = alf.index(c)
puts alf[a+1]
//  [ruby]
$><<gets.next
//  [ruby]
n = gets.chomp
a = [*"a".."z"]
i = 0
count = 0
while true
  if count >= 1
    puts a[i]
    break
  end
  if a[i] == n
    count += 1
  end
    i += 1
end
//  [ruby]
c = gets.chomp
als = %w[a b c d e f g h i j k l m n o p q r s t u v w x y z]
als.each_with_index do |a, idx|
  puts als[idx+1] if a == c
end
//  [ruby]
next_c = "abcdefghijklmnopqrstuvwxy".chars.zip("bcdefghijklmnopqrstuvwxyz".chars).to_h
puts next_c[gets.chomp]
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn add_char(c: char) -> char{
    std::char::from_u32(c as u32 + 1).unwrap_or(c)
}

fn main(){

    input!{
        c: chars,
    }

    println!("{}", add_char(c[0]));
}
//  [rust]
use std::io;

fn main() {
    let mut x = String::new();
    io::stdin().read_line(&mut x).unwrap();
    let mut x = x.trim().chars().next().unwrap();
    println!("{}", (x as u8 + 1) as char);
}