Language: C++

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

#define FOR(i,a,b) for(i=(a);i<(b);++i) 
#define FORR(i,a,b) for(i=(a);i>(b);--i)
#define REP(i,n) for(i=0;i<(n);++i)
#define REPR(i,n) for(i=(n);i>0;--i)
#define ll long long
#define INT_MAX 2147483647
#define LL_MAX 9223372036854775807

using namespace std;

long long GCD(long long a, long long b) {
	if (a < b)
		swap(a, b);
	if (b == 0) return a;
	else return GCD(b, a % b);
}
bool sosuu_check(int num) {
	int i;
	for (i = 2; i <= sqrt(num); ++i) {
		if (num%i == 0)
			return false;
	}
	return (num < 2) ? false : true;
}
int main() {
	int i;
	vector<int> vec(26);
	string S, T
	cin >> S >> T;
	REP(i, S.size()) {
		if (S[i] == 'a') {
			if (T[i] == 'a') {
				if (vec[0] != 1 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 1;
			}
			if (T[i] == 'b') {
				if (vec[0] != 2 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 2;
			}
			if (T[i] == 'c') {
				if (vec[0] != 3 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 3;
			}
			if (T[i] == 'd') {
				if (vec[0] != 4 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 4;
			}
			if (T[i] == 'e') {
				if (vec[0] != 5 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 5;
			}
			if (T[i] == 'f') {
				if (vec[0] != 6 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 6;
			}
			if (T[i] == 'g') {
				if (vec[0] != 7 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 7;
			}

			if (T[i] == 'h') {
				if (vec[0] != 3 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 8;
			}
			if (T[i] == 'i') {
				if (vec[0] != 9 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 9;
			}
			if (T[i] == 'j') {
				if (vec[0] != 10 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 10;
			}
			if (T[i] == 'k') {
				if (vec[0] != 11 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] =11;
			}
			if (T[i] == 'l') {
				if (vec[0] != 12 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 12;
			}
			if (T[i] == 'm') {
				if (vec[0] != 13 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 13;
			}
			if (T[i] == 'n') {
				if (vec[0] != 14 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 14;
			}
			if (T[i] == 'o') {
				if (vec[0] != 15 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 15;
			}
			if (T[i] == 'p') {
				if (vec[0] != 16 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 16;
			}
			if (T[i] == 'q') {
				if (vec[0] != 17 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 17;
			}
			if (T[i] == 'r') {
				if (vec[0] != 18 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 18;
			}
			if (T[i] == 's') {
				if (vec[0] != 19 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 19;
			}
			if (T[i] == 't') {
				if (vec[0] != 20 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 20;
			}
			if (T[i] == 'u') {
				if (vec[0] != 21 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 21;
			}
			if (T[i] == 'v') {
				if (vec[0] != 22 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 22;
			}
			if (T[i] == 'w') {
				if (vec[0] != 23 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 23;
			}
			if (T[i] == 'x') {
				if (vec[0] != 24 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 24;
			}
			if (T[i] == 'y') {
				if (vec[0] != 25 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 25;
			}
			if (T[i] == 'z') {
				if (vec[0] != 26 && vec[0] != 0) {
					cout << "No" << endl;
					return 0;
				}
				vec[0] = 26;
			}
		}
	}
	cout << s<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: expected initializer before 'cin'
   36 |         cin >> S >> T;
      |         ^~~
a.cc:39:29: error: 'T' was not declared in this scope
   39 |                         if (T[i] == 'a') {
      |                             ^
a.cc:46:29: error: 'T' was not declared in this scope
   46 |                         if (T[i] == 'b') {
      |                             ^
a.cc:53:29: error: 'T' was not declared in this scope
   53 |                         if (T[i] == 'c') {
      |                             ^
a.cc:60:29: error: 'T' was not declared in this scope
   60 |                         if (T[i] == 'd') {
      |                             ^
a.cc:67:29: error: 'T' was not declared in this scope
   67 |                         if (T[i] == 'e') {
      |                             ^
a.cc:74:29: error: 'T' was not declared in this scope
   74 |                         if (T[i] == 'f') {
      |                             ^
a.cc:81:29: error: 'T' was not declared in this scope
   81 |                         if (T[i] == 'g') {
      |                             ^
a.cc:89:29: error: 'T' was not declared in this scope
   89 |                         if (T[i] == 'h') {
      |                             ^
a.cc:96:29: error: 'T' was not declared in this scope
   96 |                         if (T[i] == 'i') {
      |                             ^
a.cc:103:29: error: 'T' was not declared in this scope
  103 |                         if (T[i] == 'j') {
      |                             ^
a.cc:110:29: error: 'T' was not declared in this scope
  110 |                         if (T[i] == 'k') {
      |                             ^
a.cc:117:29: error: 'T' was not declared in this scope
  117 |                         if (T[i] == 'l') {
      |                             ^
a.cc:124:29: error: 'T' was not declared in this scope
  124 |                         if (T[i] == 'm') {
      |                             ^
a.cc:131:29: error: 'T' was not declared in this scope
  131 |                         if (T[i] == 'n') {
      |                             ^
a.cc:138:29: error: 'T' was not declared in this scope
  138 |                         if (T[i] == 'o') {
      |                             ^
a.cc:145:29: error: 'T' was not declared in this scope
  145 |                         if (T[i] == 'p') {
      |                             ^
a.cc:152:29: error: 'T' was not declared in this scope
  152 |                         if (T[i] == 'q') {
      |                             ^
a.cc:159:29: error: 'T' was not declared in this scope
  159 |                         if (T[i] == 'r') {
      |                             ^
a.cc:166:29: error: 'T' was not declared in this scope
  166 |                         if (T[i] == 's') {
      |                             ^
a.cc:173:29: error: 'T' was not declared in this scope
  173 |                         if (T[i] == 't') {
      |                             ^
a.cc:180:29: error: 'T' was not declared in this scope
  180 |                         if (T[i] == 'u') {
      |                             ^
a.cc:187:29: error: 'T' was not declared in this scope
  187 |                         if (T[i] == 'v') {
      |                             ^
a.cc:194:29: error: 'T' was not declared in this scope
  194 |                         if (T[i] == 'w') {
      |                             ^
a.cc:201:29: error: 'T' was not declared in this scope
  201 |                         if (T[i] == 'x') {
      |                             ^
a.cc:208:29: error: 'T' was not declared in this scope
  208 |                         if (T[i] == 'y') {
      |                             ^
a.cc:215:29: error: 'T' was not declared in this scope
  215 |                         if (T[i] == 'z') {
      |                             ^
a.cc:224:17: error: 's' was not declared in this scope
  224 |         cout << s<< endl;
      |                 ^