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 <algorithm>
#include <iostream>
#include <string>
#include <vector>

static void inputString(std::vector<char>& v1)
{
    std::string tmp;

    if (0x00 == &v1) {
        std::cerr << "v1 is null" << std::endl;
        exit (1);
    }

    std::cin >> tmp;
    for (int i = 0; i < tmp.size(); i++) {
        v1.push_back(tmp.at(i));
    }
}

static void reverseString(std::vector<char>& v1, std::vector<char>& v2)
{
    if (0x00 == &v1 || 0x00 == &v2) {
        std::cerr << "v1 or v2 are null." << std::endl;
        exit (1);
    }

    if (v2.empty()) {
        v2.resize(v1.size());
    }

    std::reverse_copy(v1.begin(), v1.end(), v2.begin());
}

int main()
{
    std::vector<char> vec1;
    std::vector<char> vec2;
    
    inputString(vec1);
    reverseString(vec1, vec2);
    for (int i = 0; i < vec2.size(); i++) {
        std::cout << vec2.at(i);
    }
    std::cout << std::endl;

    return 0;
}

C++: /*文字列 str を入力し、その文字列を逆順に出力するプログラムを作成して下さい。
文字は半角英数字のみで、20 文字以内とします。*/ 
#include<iostream>
using namespace std;
int main(){
    string str;
    cin>>str;
    char ji[str.size()];
    for(int i=0;i<=str.size();i++){
       ji[i]=str[str.size()-i];
    }
    for(int i=0;i<=str.size();i++){
       cout<<ji[i];
    }
    //cout<<endl;
}

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

int length(char chr[]) {
    int num = 0;
    for(int r = 0; r < 30; r++) {
        if(chr[r] == '\0') break;
        num++;
    }
    return(num);
}

int main(void) {
    char ary[30];
    scanf("%s", ary);
    int len = length(ary);
    
    for(int r = len - 1; r >= 0; r--) {
        putchar(ary[r]);
    }
    putchar('\n');
    
    //cout << len << endl;
    return(0);
}

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

int main() {
    
    string str;
    string::reverse_iterator rStr;
    cin >> str;
    for(rStr = str.rbegin(); rStr < str.rend(); rStr++) cout << *rStr;
    cout << "\n";
    return 0;
}

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

int main(){
  int len;
  string str;

  cin >> str;

  len=str.size();

  for (int i=1; i<=len; i++){
    cout << str.substr(len-i,1);
  }

  cout << endl;
  return 0;
}

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

using namespace std;

int main() {
	string str;
	cin >> str;
	int N = (int)str.size();
	int n = N/2;
	for (int i=0; i<n; i++) {
		char swap = str[i];
		str[i] = str[N-i-1];
		str[N-i-1] = swap;
	}
	cout << str << endl;
	return 0;
}

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

int main(){
	string str;
	string::reverse_iterator ri;
	while(cin>>str){
		ri=str.rbegin();
		while(ri!=str.rend()){
			cout<<*ri;
			++ri;
		}
		cout<<endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
	char str[22];

	fgets( str, sizeof( str ) - 1, stdin );

	for ( int i = strlen( str ) - 2; 0 <= i; i-- )
	{
		putchar( str[i] );
	}
	putchar('\n');

	return 0;
}

C++: #include<algorithm>
#include<iostream>
int main(void){
std::string s;
std::cin>>s;
std::reverse(s.begin(),s.end());
std::cout<<s;
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<iostream>
using namespace std;
int main(){
  char a[20];
  int i=0;
  while(cin>>a[i]){
    i++;
  }
  for(int j=i-1;i>=0;i--){
    cout<<a[j];
    }
    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main()
{
	char a[21] = {};
	char b[21] = {};
	int alen = 0;
	cin >> a;
	alen = strlen(a);
	for (int i = 0; i < alen; i++) {
		b[i] = a[alen - i-1];
	}
	cout << b << endl;
	

	return 0;
	
}

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

int main()
{
    char s[21] = {};
    scanf("%20s", s);
    for (int i = strlen(s) - 1; i >= 0; --i) putchar(s[i]);
}

C++: #include <iostream>
using namespace std;
int main(){
  string s;
  while(cin >> s){
    cout << string(s.rbegin(), s.rend()) << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>

using namespace std;
typedef long long Int;
#define REP(i , x) for(int i = 0 ; i < x ; ++i)

typedef pair<int, int> P;


string a;


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

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

using namespace std;

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

C++: #include<stdio.h>
#include<string.h>
int main(void)
{
	int i;
	char str[20];
	scanf("%s",str);
		for(i=strlen(str)-1;i>=0;i--){
			printf("%c",str[i]);
		}
	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[21];
 
    cin >> str;
    sort(str);
    cout << str << endl;
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<string.h>
using namespace std;
typedef long long ll;

int main()
{
	char a[100];
	cin >> a;
	int len= strlen(a);
	for (int i=len-1; i>=0; i--){
		cout << a[i];
	}
	cout << endl;
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
    int i,j;
    char str[20];
    cin>>str;

    for(i=0;;i++)
    {
        if(str[i]=='\0')
        break;
    }
    for( j=i;j>=0;j--)
    {
       
       cout<<str[j];
    }
    return 0;
}

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

int main(void){
	int i;
	int len;
	char str[20],rts[20] = {};

	scanf("%s",str);
	len = strlen(str);
	for(i = 0;i < len;i++){
		rts[i] = str[len - (i+1)];
	}
	rts[len] = '\0';
	printf("%s\n",rts);
	return 0;
}

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

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

C++: #include<stdio.h>
int main(){
  char z[100];
  int i,j;
  scanf("%s",&z);
  for(i=0; z[i]!='\0';i++){
  }
  if(i<=20){
    for(j=i;j>=0;j--){
      printf("%c",z[j]);
    }
    printf("\n");
    }
  return 0;
}

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

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

int main(){

int i,len;
char str[22];

scanf'("%s",str);

len=strlen(str);

for(i=len-1;i>=0;i--){
printf("%c",str[i]);
}
printf("\n");

return 0;
}

C++: #include <iostream>
using namespace std;
void reverseSequence()
{
	char s[20];
	cin >> s;
	int i;

	for (i = 0; i < 20; i++)
	{
		if (s[i] == '\0')
		{
			break;
		}
	}
	for (int j = i - 1; j >= 0; j--)
	{
		cout << s[j];
	}
	cout << endl;
}

int main()
{
	reverseSequence();
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long int ll;
typedef vector<long long int> vi;

int main(){
	string str;
	cin >> str;
	reverse(ALL(str));
	cout << str << "\n";
}

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