Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		str := []rune(scanner.Text())
		for i:=len(str)-1; i>=0; i-- {
			fmt.Printf(string(str[i]))
		}
		fmt.Println()
	}
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <iomanip>
#include <fstream>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <utility>
#include <numeric>
using namespace std;

constexpr int INF       = 1000000000;/* 1e+9a */
constexpr int MODULO    = 1000000007;

#define int long

#define REP(i,f,n) for(int i=(f); i < (n); ++i)
#define PER(i,f,n) for(int i=(n-1); i >= f; --i)

constexpr int evx[4] = { 1, 0, -1, 0 };
constexpr int evy[4] = { 0, 1, 0, -1 };

//----------------------------------
//----------------------------------

signed main()
{
    ios::sync_with_stdio(false);
	string s;
	cin >> s;
	PER(i, 0, s.size())
		cout << s[i];
	cout << endl;
}

C++: #include <iostream>
using namespace std;
int main(){
char a[40];
cin.getline(a,40);
for(int i=40;i>1;i--){
cout<<a[i];
}
cout<<endl;
return 0;
}

C++: #include <stdio.h>

int main(int argc, char** argv)
{
  char a[20 + 1];

  fscanf(stdin, "%s", a);

  char* p;

  for (p = a; *p != '\0'; p ++)
    ;

  for (int i = p - a; i > 0; i --)
    fputc(a[i - 1], stdout);
  
  fputc('\n', stdout);
}

C++: #include <iostream>
#include <algorithm>
#include <string>

int main(void)
{
  std::string str;
  std::cin >> str;
  
  std::string rev;
  for (int i = str.size() - 1; i >= 0; i--) {
    rev.push_back(str[i]);
  }
  
  std::cout << rev << std::endl;
  
  return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

    string s;

    cin >> s;

    for(int i = s.size() - 1; i >= 0; i--) {
        cout << s[i];
    }

    cout << endl;

    return 0;

}

C++: #include<iostream>
#include<string>

int main(){
	std::string st;
	
	std::cin >> st;
	
	while(!(st.empty())){
		std::cout << st.back();
		st.pop_back();
	}
	
	return 0;
}

C++: #include<iostream>
#include <algorithm>

using namespace std;

int main() {

	char str[20];
	int i, len;

	cin >> str;
	len = strlen(str);

	for (i = len - 1; i >= 0; i--)
		cout << str[i];

	putchar('\n');

	return 0;

}

C++: #include<string>
#include<iostream>
using namespace std;
int main() {
	string s;
	cin >> s;
	for (int i = s.size() - 1; i>= 0; i--) {
		cout << s[i];
	}
	cout << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<int,int> P;
#define vrep(v,n) for(int i=0;i<n;i++){cin >> v.at(i);} //配列vにn個の要素を入力する
#define rep(i, l, n) for (int i = l; i < (int)(n); i++)
#define repn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 

const int mod = 1000000007;
const int inf = 1e9;

string rev(string s){
    string rev;
    rep(i,0,s.length()) rev += s[s.length()-1-i];
    return rev;
}

int main(){
    string s;
    cin >> s;
    cout << rev(s) << endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    string s;
    cin>>s;
    reverse(s.begin(), s.end());
    cout<<s<<'\n';
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  char str[21];
  cin >> str;
  for(int i=strlen(str);i>=0;i--){
    printf("%c",str[i]);
  }
  cout << endl;
  return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	string a;
	while(cin>>a){
		int n=a.size()-1;
		while(n>=0){
			cout<<a[n];
			n--;
		}
		cout<<endl;
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

#define REPR(i, n) for(int i = n; i >= 0; i--)

int main() {
    string s;
    cin >> s;
    REPR(i, s.size() - 1) cout << s[i];
    return 0;
}

C++: #include <stdio.h> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { long long n; scanf("%lld",&n); printf("%lld",n%10); for (int i=10;i<n;) { i=10*i; printf("%lld",((n%i)-(n%(i/10)))/(i/10)); } return 0; }

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <queue>
#include <cmath>

#define int64 long long int

using namespace std;

string rev(string);

int main()
{
    string str;
    cin >> str;
    cout << rev(str) << endl;
    return 0;
}


string rev(string str){
    int len, s, t;
    char buf;
    len = str.size();
    s = 0, t = len-1;
    while(s < t){
        buf = str[s], str[s] = str[t], str[t] = buf;
        s++, t--;
    }
    return str;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
	char str[21];
	char str2[21];
	int i, cont = 0;
	
	cin >> str;
	
	for(i = 0; str[i] != '\0'; i++){
	}
	for(;i > -1; i--){
		str2[cont] = str[i-1];
		cont++;
	}
	cout << str2 << endl;
}

C++: #include<iostream>
#include<string>
using namespace std;

int main(){

	string str;

	while(cin>>str){

		for(int i=0;i<str.size();i++){
			cout<<str.at(str.size()-i-1);
		}

		cout<<endl;

	}

	return 0;

}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
using namespace std;

template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void POSS(T condition){ if(condition) cout << "POSSIBLE" << endl; else cout << "IMPOSSIBLE" << endl; }
template<class T> inline void Poss(T condition){ if(condition) cout << "Possible" << endl; else cout << "Impossible" << endl; }
template<class T> inline void First(T condition){ if(condition) cout << "First" << endl; else cout << "Second" << endl; }
int character_count(string text, char character){ int ans = 0; for(int i = 0; i < text.size(); i++){ ans += (text[i] == character); } return ans; }
long power(long base, long exponent, long module){ if(exponent % 2){ return power(base, exponent - 1, module) * base % module; }else if(exponent){ long root_ans = power(base, exponent / 2, module); return root_ans * root_ans % module; }else{ return 1; }}
struct position{ int y, x; }; position move_pattern[4] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}}; // double euclidean(position first, position second){ return sqrt((second.x - first.x) * (second.x - first.x) + (second.y - first.y) * (second.y - first.y)); }
template<class itr, class func> void array_output(itr start, itr goal, func out = [](itr x) { return x; } ){ string ans; for(auto i = start; i != goal; i++){ ans += to_string(*i) + " "; } ans.pop_back(); cout << ans << endl; }
template<class itr, class func> void nint_output(itr start, itr goal, func out = [](itr x) { return x; } ){ string ans; for(auto i = start; i != goal; i++){ ans += string(out(*i)) + " "; } ans.pop_back(); cout << ans << endl; }
long gcd(long a, long b){ if(a && b){ return gcd(min(a, b), max(a, b) % min(a, b)); }else{ return a; }}
#define mod long(1e9 + 7)
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcount(n)

int main(){
    string s;
    cin >> s;
    reverse(all(s));
    cout << s << endl;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main (){
    string s;
    cin >> s;
     for (int i=0; i<s.size(); i++){
         cout << s[s.size()-i-1] ;
     }
     return 0;
}

C++: #include <iostream>
#include<string>
using namespace std;

int main(){
  string s;
  cin>>s;
  for(int i=s.size();i--;){
    cout<<s[i];
  }cout<<endl;
}

C++: #include <cstdio>
using namespace std;

int main(){
	char str[25];
	
	for(int i = 0; i < 25; i++) str[i] = 0;
	
	scanf("%s", str);
	
	int p = 25;
	while(str[--p] == 0);
	while(p >= 0){
		printf("%c", str[p--]);
	}
	printf("\n");
	
	return 0;
}