import java.util.*;
import java.io.*;
public class StringPractice {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("input sth");
String st=br.readLine();
System.out.println(StringReverse(st));
}
public static String StringReverse(String s){
//根据字符串s的长度定义char数组的长度
char[] chs = new char[s.toCharArray().length];
//循环截取字符,逆序赋值给字符数组chs
for(int i=0;i<s.length();i++){
int j = s.length()-1-i;
chs[j] = s.charAt(i);
}
//根据chs数组构造新字符串s1
String s1 = new String(chs);
return s1;
}
}
import java.io.*;
public class StringPractice {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("input sth");
String st=br.readLine();
System.out.println(StringReverse(st));
}
public static String StringReverse(String s){
//根据字符串s的长度定义char数组的长度
char[] chs = new char[s.toCharArray().length];
//循环截取字符,逆序赋值给字符数组chs
for(int i=0;i<s.length();i++){
int j = s.length()-1-i;
chs[j] = s.charAt(i);
}
//根据chs数组构造新字符串s1
String s1 = new String(chs);
return s1;
}
}