Go: package main

import "fmt"

func main() {
	var str string
	var result string

	fmt.Scanf("%s", &str)

	for i := len(str) - 1; i >= 0; i-- {
		result += string(str[i])
	}

	fmt.Println(result)
}

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;
}

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

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i < _##i poi i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i >= _##i poi i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i > _##i poi i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

using namespace std;

template<class T> T lov_yet(T t){
    if(t) return t poi
    else return 0 poi
}

template<class T> T gcd(T a, T b){
    if(b) return gcd(b, a % b) poi
    else return a poi
}

int main(){
    string pyon poi
    cin >> pyon poi
    reverse(pyon.begin(), pyon.end()) poi
    cout << pyon poipoi poi
    return 0 poi
}

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

int main() {
  string str;
  cin >> str;
  
  for(int i = str.size() - 1; i >= 0; i--){
    cout << str.at(i);
  }
  cout << endl;
}

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

int main(){
char str[20];
for(int i=0;i<20;i++){cin>>str[i];}
for(int i=19;i>-1;i--){cout<<str[i];}
}

C++: #include<stdio.h>
#include<string.h>
 main()
 {
    char s[21], tmp;
    int i, sl;
   while(scanf("%s",s)==1)

    {
    sl=strlen(s);
    for(i=0;i<sl/2;i++)
 {
    tmp=s[i];
    s[i]=s[sl-i-1];
    s[sl-i-1]=tmp;
    }
    printf("%s\n", s);
    }
return 0;
 }

C++: #include<stdio.h>
#include<string.h>
int main()
{

    char str,rev,arr[100];
    printf("Enter a string to reverse\n");
    gets(arr);
    strrev(arr);
    printf("%s",arr);
    return 0;

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdio>
#include <istream>
#include <sstream>
#include <iomanip>
#include <iterator>
#include <climits>
using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef vector<int> VI;
typedef vector< VI > VVI;

typedef long long LL;

typedef pair<int, int> PII;
typedef vector<PII> VPII;

#define X first
#define Y second

int main(void) {
	string s;
	cin >> s;

	string r = string(s.rbegin(), s.rend());
	
	cout << r  << endl;

	return 0;
}

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

using namespace std;

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

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

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

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

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

int main(int argc, char *argv[]) {
	char rcv[20];
	char out[20];
	fscanf(stdin, "%s", rcv);
	int cnt = 0;
	for (int i = 0; i < 20; i++) {
		if (rcv[i] == '\0') {
			for (int j = i-1; j !=-1; j--) {
				out[cnt] = rcv[j];
				cnt++;
			}
			out[cnt] = '\0';
			break;
		}
	}
	printf("%s\n", out);
	
	return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

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

	reverse(s.begin(), s.end());
	cout << s << endl;
}