Go: package main

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

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 main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	input := scanner.Text()
	fmt.Println(reverse(input))
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
#include<sstream>
#include<iterator>
using namespace std;
typedef  long long int lint;
typedef pair<int, int> IP;
typedef pair<lint, lint> LLP;
typedef pair<char, char>CP;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
#define llower(v,hoge) *lower_bound(v.begin(), v.end(), hoge)
#define lupper(v,hoge) *upper_bound(v.begin(), v.end(), hoge)

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

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

#include "mathematical.h"

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++: print raw_input()[::-1]

C++: #include <iostream>
#include <bits/stdc++.h> 
using namespace std;
int main() {
string str;
cin >> str;
reverse(str.begin(), str.end());
cout << str << endl;
}

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

using namespace std;

int main(){
	string str;
	string ans;
	while(1){
		cin >> str;
		ans = str;
		for (int i = 0; i < str.size(); i++){
			ans[i] = str[str.size() - i - 1];
		}
		cout << ans << endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    string str;
    cin>>str;
    reverse(str.begin(),str.end());
    cout<<str<<endl;
    return 0;
}

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

int main(void){
  string str;
  cin >> str;
  int l = str.size();
  for(i = l; i >= 0; i++){
    cout << str[i];
  }
  cout << endl;
  return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main()
{
  string str;
  int i;
  cin >> str;
  i=str.length();
  while(i!=0)
  {
    cout << str[i-1];
    i--;
  }
    cout << endl;
    return 0;
}

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

using namespace std;

int main()
{
    string str;
    cin>>str;
    for(int i = 0;i<str.length();i++)
        cout<<str[str.length()-(i+1)];

    cout<<"\n";

    return 0;
}

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

using namespace std;

int main()
{
	string s;
	char c;
	
	while (getline(cin, s))
	{
		for (string::reverse_iterator it = s.rbegin(); it < s.rend(); it++)
		{
			cout << *it;
		}
	}
	
	return 0;
}

C++: #include<cstdio>
#include<cstring>
int main(){
	char str_i[20],str_o[20];
	scanf("%s",str_i);
	int l = strlen(str_i);
	printf("%d\n",l);
	for(int i=0;i<l;i++){
		str_o[i] = str_i[l-1-i];
		printf("%c",str_o[i]);
	}
	printf("\n");
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <vector>
#include <stack>
#include <map>
#include <queue>
#include <string.h>
#include <algorithm>
#include <iostream>
#define ll long long
#define db double
#define INFINITE 9999999

using namespace std;

string func(string s){
    int l=s.size();
    for(int i=0,j=l-1;i<j;i++,j--){
        swap(s[i],s[j]);
    }
    return s;
}

int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    string s;
    getline(cin,s);
    cout<<func(s)<<endl;
    return 0;
}

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

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)  //a~(b - 1)?????§
#define all(i) (i).begin(),(i).end() //??¨??????(sort??¨???)
#define mp make_pair //mp(OO, OO)??¨???:::pint??¨???

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
/*-------------------------------*/

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

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

int main(){
  string s;
  cin >> s;
  reverse(s.begin(),s.end());
  cout << s << endl;
}

C++: #include<stdio.h>
#include<string.h>
int main(){
int i;
char s[50];
scnaf("%s",s);
for(i=strlen(s)-1;i>-1;i--)printf("%c",s[i]);
printf("\n");
return 0;}

C++: #include <iostream>
using namespace std;
int main()
{
    string s;
    while(getline(cin, s))
    {
        string res;
        istringstream ss(s);
        string c;
        while(ss >> c)
        {
            for(int i = c.length() - 1; i >= 0; i--)
                res += c[i];
            res += " ";
        }
        res.erase(res.length() - 1, 1);
        cout << res << endl;
    }
    return 0;
}

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

int main() {
  string input;
  cin >> input;

  auto itr = input.end();
  while(itr != input.begin()) {cout << *(--itr);}
  cout << endl;
  return 0;
}

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

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

C++: #include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

void sort(char *str){
	int len, len2 = 0;
	char work; 
	len = strlen(str);

	for(len = len - 1; len > len2; len--, len2++){
		work = str[len];
		str[len] = str[len2];
		str[len2] = work;
	}
}

int main(){
	char str[20];
	cin >> str;
	sort(str);
	cout << str << endl;
	return 0;
}

C++: 
using namespace std;

main(){
  
  char str[21];
  int i=0;
  while(cin >> str[i]){i++;}
  
  i--;
  int j=i;
  for(j=i;j>=0;j--){
    
    cout << str[j] ; 
  }
  cout << endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
void print();
int main()
{
	print();
	cout.put('\n');
}

void print()
{
	char c = cin.get();
	if (c == '\n');
	else
	{
		print();
		cout << c;
	}
}

C++:  /*
Write a program which reverses a given string str.
 */

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main() {
	string str;
	cin >> str;
	reverse(str.begin(), str.end());
	cout << str << endl;
	return 0;
}

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

using namespace std;

string reverse(string s);

int main()
{
    string str;
    cin >> str;

    cout << reverse(str) << endl;
}

string reverse(string s)
{
    string rev;
    int len = s.length();

    for(int i = 1; i <= len; i++)
        rev += s.substr(len - i, 1);

    return rev;
}

C++: #include<iostream>

using namespace std;

main(){
  
  char str[21];
  int i=0;
  while(cin >> str[i]){i++;}
  
  i--;
  int j=i;
  for(j=i;j>=0;j--){
    
    cout << str[j] ; 
  }
  cout << '\0' ;

  cout << endl;
  return 0;
}

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

int main(int argc, char** argv) {
	char str[20];
	int len, i;

	std::cin >> str;
	len = strlen(str);
	
	for(i = len - 1; i >= 0; i--) {
		std::cout << str[i];
	}
	std::cout << std::endl;
}

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