Go: package main

import (
        "fmt"
)

func main () {
        var str string
        fmt.Scanf("%s", &str)
        show(len(str)-1, str)
}

func show(n int, str string) {
        if n == 0 {
                fmt.Printf("%s\n", string(str[n]))
        } else {
                fmt.Printf("%s", string(str[n]))
                show(n-1, str)
        }
}

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

using namespace std;


int main(){
	char mozi[20];
	int last;
	scanf("%s",mozi);

	for(int i=0;mozi[i] != '\0';i++){
		last = i;
	}

	for(int i=last;0 <= i;i--){
		printf("%c\n",mozi[i]);
	}

	return 0;
}

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


int main()
{
	string str;
	
	cin >> str;
	for (int i = str.size() - 1; i >= 0; i--)
		cout << str[i];
	cout << "\n";
	return 0;
}

C++: #include <cstdio>
using namespace std;
char str[100];
int main() {
        while (~scanf("%s", str)) {
            char *ptr = str;
            while (*ptr) ++ptr;
            for (--ptr; ptr >= str; --ptr) printf("%c", *ptr);
            puts("");
        }
}

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

char str[20];
int i,len;
int main(){
	gets(str);
	len = strlen(str);
	for(i=len-1;i>=0;i--){
		printf("%c",str[i]);
	}
	printf("\n");
}

C++: #include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{   
    char a[20];
    char b[20];
    scanf("%s", a);
    int i = 0;
    int j = 0;
    while (strcmp(&a[i], "\0") != 0) {
        i += 1;
    }
    i -= 1;
    strcpy(&b[i], &a[i]);
    for (; i >=  0; i--) {
        b[j] = a[i];
        j += 1;
    } 
    printf("%s\n", b);
    return 0;
}

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

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;

}