Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)
var title = [4]int{0, 90, 180, 270}

func main() {
	p := make([][]string, 8)
	for i := range p {
		scanner.Scan()
		p[i] = strings.Split(scanner.Text(), "")
	}
	// log.Println(p)
	for i := 1; i < 4; i++ {
		fmt.Println(title[i])
		p = spin(p)
		print_p(p)
	}
}

func spin(p [][]string) [][]string {
	ret := make([][]string, 8)
	for i := range ret {
		ret[i] = make([]string, 8)
	}
	for i := 0; i < 8; i++ {
		for j := 0; j < 8; j++ {
			ret[i][j] = p[7-j][i]
		}
	}
	return ret
}

func print_p(p [][]string) {
	for _, v := range p {
		fmt.Println(strings.Join(v, ""))
	}
}

Python: table = []

for l in range(8):
    table.append(input())

print(90)
for i in range(8):
    for j in range(8):
        print(table[7-j][i], end="")
    print("")

print(180)
for i in range(8):
    for j in range(8):
        print(table[7-i][7-j], end="")
    print("")

print(270)
for i in range(8):
    for j in range(8):
        print(table[j][7-i], end="")
    print("")

Python: def Draw(pattern, rowRange, colRange):
    s = ""

    for row in rowRange:
        for col in colRange:
            s += pattern[row][col]
        s += "\n"

    print(s, end="")


def Draw2(pattern, colRange, rowRange):
    s = ""

    for col in colRange:
        for row in rowRange:
            s += pattern[row][col]
        s += "\n"

    print(s, end="")


pattern = [input() for lp in range(8)]

print("90")
Draw2(pattern, range(0, 8), range(7, -1, -1))

print("180")
Draw(pattern, range(7, -1, -1), range(7, -1, -1))

print("270")
Draw2(pattern, range(7, -1, -1), range(0, 8))

Python: m=[input() for _ in range(8)]
for i in range(3):
    m=list(zip(*m[::-1]))
    print(90*i)
    for x in m:
        print(''.join(x))

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

void Rotate(vector<string>& board)
{
	rep(y, 4) swap(board[y], board[7 - y]);
	
	rep(y, 8) rep(x, y) swap(board[y][x], board[x][y]);
}

int main()
{
    vector<string> board(8);
	
	rep(i, 8) cin >> board[i];
	
	for(int i = 1; i <= 3; i++)
	{
		Rotate(board);
		
		cout << 90 * i << endl;
		
		rep(y, 8) rep(x, 8)	cout << board[y][x] << (x == 7 ? "\n" : "");
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    string str[8];
    for(int i=0;i<8;i++)cin>>str[i];
    cout<<"90\n";
    for(int i=7;i>-1;i--){
        for(int j=0;j<8;j++)cout<<str[i][j];
        cout<<endl;
    }
    cout<<"180\n";
    for(int i=7;i>-1;i--){
        for(int j=7;j>-1;j--)cout<<str[i][j];
        cout<<endl;
    }
    cout<<"270\n";
    for(int i=0;i<8;i++){
        for(int j=7;j>-1;j--)cout<<str[i][j];
        cout<<endl;
    }
}

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

using namespace std;

int main(void){
  string str;
  vector<string> arg;

  while(cin >> str){
	arg.push_back(str);
  }

  cout << 90 << endl;
  for(int i=0;i<8;i++){
	for(int j=0;j<8;j++){
	  cout << arg[7-j][i];
	}
	cout << endl;
  }
  cout << 180 << endl;
  for(int i=0;i<8;i++){
	for(int j=0;j<8;j++){
	  cout << arg[7-i][7-j];
	}
	cout << endl;
  }

  cout << 270 << endl;
  for(int i=0;i<8;i++){
	for(int j=0;j<8;j++){
	  cout << arg[j][7-i];
	}
	cout << endl;
  }
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <deque>

using namespace std;

#define reep(i,f,t) for(int i=f ; i<int(t) ; ++i)
#define rep(i,n) reep(i, 0, n) 

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

void rotate(char str[][16])
{
	char tmp[8][8];
	rep(i, 8) rep(j, 8)
		tmp[i][j] = str[7-j][i];
	rep(i, 8)
		copy(tmp[i], tmp[i]+8, str[i]);
}

int main()
{
	char str[16][16];
	rep(i, 8)
		scanf("%s", str[i]);
	
	rep(i, 3){
		rotate(str);
		printf("%d\n", (i+1)*90);
		rep(j, 8)
			puts(str[j]);
	}
	return 0;
}

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

using namespace std;

char p[8][8];

void rotate() 
{
    char bp[8][8];
    for (int i = 0; i < 8; i++) {
        for (int j = 0; j < 8; j++) {
            bp[i][j] = p[i][j];
        }
    }

    for (int i = 0; i < 8; i++) {
        for (int j = 0; j < 8; j++) {
            p[i][j] = bp[7 - j][i];
        }
    }
}

void disp()
{
    for (int i = 0; i < 8; i++){ 
        for (int j = 0; j < 8; j++) {
            cout << p[i][j];
        }
        cout << endl;
    }
}

int main()
{
    for (int i = 0; i < 8; i++) 
        for (int j = 0; j < 8; j++ )
            cin >> p[i][j];

    cout << "90" << endl;
    rotate();
    disp();

    cout << "180" << endl;
    rotate();
    disp();

    cout << "270" << endl;
    rotate();
    disp();

    
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

int main() {
	VS s(8); rep(i, 8)cin >> s[i];

	puts("90");
	rep(i, 8) {
		for (int j = 7; j >= 0; j--)cout << s[j][i];
		puts("");
	}

	puts("180");
	for (int i = 7; i >= 0; i--) {
		for (int j = 7; j >= 0; j--)cout << s[i][j];
		puts("");
	}

	puts("270");
	for (int i = 7; i >= 0; i--) {
		rep(j, 8)cout << s[j][i];
		puts("");
	}
}

C++: #include <iostream>
#include <string>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)

int main() {
	string s;
	char b[8][8],nb[8][8];
	rep(i,8) {
		cin >> s;
		rep(j,8) {
			b[i][j] = s[j];
		}
	}
	rep2(i,1,4) {
		cout << 90*i << endl;
		rep(i,8) {
			rep(j,8) {
				nb[i][j] = b[7-j][i];
			}
		}
		rep(i,8) {
			rep(j,8) {
				b[i][j] = nb[i][j];
				cout << b[i][j];
			}
			cout << endl;
		}
	}
	return 0;
}

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

int main() {
	char s[8][8];
	for(int i=0;i<8;i++){
		for(int j=0;j<8;j++){
			cin>>s[i][j];
		}
	}
	cout<<"90"<<endl;
	for(int i=7;0<=i;i--){
		for(int j=0;j<8;j++){
			cout<<s[i][j];
		}
		cout<<endl;
	}
	
	cout<<"180"<<endl;
	for(int i=7;0<=i;i--){
		for(int j=7;0<=j;j--){
			cout<<s[i][j];
		}
		cout<<endl;
	}
	cout<<"270"<<endl;
	for(int i=0;i<8;i++){
		for(int j=7;0<=j;j--){
			cout<<s[i][j];
		}
		cout<<endl;
	}
	
	return 0;
}