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, ""))
	}
}

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

int main(void){
	char map[12][12];
	for(int j=0;j<=7;j++){
		cin >> map[j];
	}
	printf("90\n");
	for(int i=7;i>=0;i--){
		for(int j=0;j<=7;j++){
			printf("%c",map[i][j]);
		}
		printf("\n");
	}
	printf("180\n");
	for(int i=7;i>=0;i--){
		for(int j=7;j>=0;j--){
			printf("%c",map[i][j]);
		}
		printf("\n");
	}
	printf("270\n");
	for(int i=0;i<=7;i++){
		for(int j=7;j>=0;j--){
			printf("%c",map[i][j]);
		}
		printf("\n");
	}
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	char masu[9][9]={""};
	for(int i=0;i<8;i++){
		for(int j=0;j<8;j++){
			cin>>masu[i][j];
		}
	}
	cout<<"90"<<endl;
	for(int i=7;i>=0;i--){
		for(int j=0;j<8;j++){
			cout<<masu[i][j];
		}
		cout<<endl;
	}
	cout<<"180"<<endl;
	for(int i=7;i>=0;i--){
		for(int j=7;j>=0;j--){
			cout<<masu[i][j];
		}
		cout<<endl;
	}
	cout<<"270"<<endl;
	for(int i=0;i<8;i++){
		for(int j=7;j>=0;j--){
			cout<<masu[i][j];
		}
		cout<<endl;
	}
	return 0;
}

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

int main(){
  char t[10][10], t_tmp[10][10];

  for(int i = 0; i < 8; i++){
    cin >> t[i];
  }

  for(int loop = 1; loop <= 3; loop++){
    cout << 90 * loop << endl;
    memcpy(t_tmp, t, sizeof(t));

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

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

C++: #include<iostream>
#include<string>
using namespace std;
int main() {
	string l[8];
	for (int i = 0; i < 8; i++){
		cin >> l[i];
	}
	cout << 90 << endl;;
	for (int i = 0; i < 8; i++){
		cout << l[7][i];
		cout << l[6][i];
		cout << l[5][i];
		cout << l[4][i];
		cout << l[3][i];
		cout << l[2][i];
		cout << l[1][i];
		cout << l[0][i];
		cout << endl;
	}
	cout << 180 << endl;
	for (int i = 0; i < 8; i++){
		cout << l[7 - i][7];
		cout << l[7 - i][6];
		cout << l[7 - i][5];
		cout << l[7 - i][4];
		cout << l[7 - i][3];
		cout << l[7 - i][2];
		cout << l[7 - i][1];
		cout << l[7 - i][0];
		cout << endl;
	}
	cout << 270 << endl;
	for (int i = 0; i < 8; i++){
		cout << l[0][7 - i];
		cout << l[1][7 - i];
		cout << l[2][7 - i];
		cout << l[3][7 - i];
		cout << l[4][7 - i];
		cout << l[5][7 - i];
		cout << l[6][7 - i];
		cout << l[7][7 - i];
		cout << endl;
	}
	char c;
	cin >> c;
	return 0;
}

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

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

  cout << "90" << endl;
  for(int i = 0 ; i < 8 ; i++)
    for(int j = 0 ; j < 8 ; j++)
      cout << mat[8-i-1][j];

  cout << endl;

  cout << "180" << endl;
  for(int i = 0 ; i < 8 ; i++)
    for(int j = 0 ; j < 8 ; j++)
      cout << mat[8-i-1][8-j-1];

  cout << endl;
  
  cout << "270" << endl;
  for(int i = 0 ; i < 8 ; i++)
    for(int j = 0 ; j < 8 ; j++)
      cout << mat[i][8-j-1];

  cout << endl;

  return 0;
}

C++: #include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define itrep(it, a) for(it = (a).begin(); it != (a).end(); it++)
#define all(a) (a).begin(), (a).end()
#define debug(x) cout << "debug " << x << endl;
#define INF (1 << 30)
using namespace std;

int main(){
    char a[8][8];
    rep(i,8) rep(j,8) cin >> a[i][j];

    cout << 90 << endl;
    rep(i,8){
        for(int j = 7; j >= 0; j--){
            cout << a[j][i];
        }cout << endl;
    }
    cout << 180 << endl;
    for(int i = 7; i >= 0; i--){
        for(int j = 7; j >= 0; j--){
            cout << a[i][j];
        }cout << endl;
    }
    cout << 270 << endl;
    for(int i = 7; i >= 0; i--){
        rep(j,8){
            cout << a[i][j];
        }cout << endl;
    }

}

C++: #include <iostream>
using namespace std;
/** Problem0133 : Rotation of a Pattern **/
int main()
{
	char ptn[8][8];
	for (int y=0; y<8; y++)
		for (int x=0; x<8; x++)
			cin >> ptn[x][y];

	cout << "90" << endl;
	for (int y=0; y<8; y++) {
		for (int x=7; x>=0; x--) {
			cout << ptn[y][x];
		}
		cout << endl;
	}
	
	cout << "180" << endl;
	for (int y=7; y>=0; y--) {
		for (int x=7; x>=0; x--) {
			cout << ptn[x][y];
		}
		cout << endl;
	}
	
	cout << "270" << endl;
	for (int y=7; y>=0; y--) {
		for (int x=0; x<8; x++) {
			cout << ptn[y][x];
		}
		cout << endl;
	}
	
	return 0;
}

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

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

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

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

  return 0;
}

C++: #include <iostream>
using namespace std;
string b[8];
int main() {
    for (int i=0; i<8; i++) cin>>b[i];
    cout<<90<<endl;
    for (int i=0; i<8; i++) {
        for (int j=7; j>=0; j--) {
            cout<<b[j][i];
        }
        cout<<endl;
    }
    cout<<180<<endl;
    for (int i=7; i>=0; i--) {
        for (int j=7; j>=0; j--) {
            cout<<b[i][j];
        }
        cout<<endl;
    }
    cout<<270<<endl;
    for (int i=7; i>=0; i--) {
        for (int j=0; j<8; j++) {
            cout<<b[j][i];
        }
        cout<<endl;
    }
}

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

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  string s[8];
  for (int i = 0; i < 8; i++) {
    cin >> s[i];
  }
  cout << "90" << endl;
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++) {
      cout << s[7 - i][j];
    }
    cout << endl;
  }
  cout << "180" << endl;
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      cout << s[7 - i][7 - j];
    }
    cout << endl;
  }
  cout << "270" << endl;
  for (int j = 0; j < 8; j++) {
    for (int i = 0; i < 8; i++) {
      cout << s[i][7 - j];
    }
    cout << endl;
  }

  return 0;
}

C++: #include <stdio.h>
int main(){
    char a[8][8];
    for(int i=0;i<8;i++){
        for(int j=0;j<8;j++){
            scanf("%c",&a[i][j]);
            if(a[i][j]=='\n')j--;
        }
    }
    printf("90\n");
    for(int i=7;i>=0;i--){
        for(int j=0;j<8;j++){
            printf("%c",a[i][j]);
        }
        printf("\n");
    }
    printf("180\n");
    for(int i=0;i<8;i++){
        for(int j=0;j<8;j++){
            printf("%c",a[j][i]);
        }
        printf("\n");
    }
    printf("270\n");
    for(int i=7;i>=0;i--){
        for(int j=0;j<8;j++){
            printf("%c",a[j][i]);
        }
        printf("\n");
    }
}

C++: #include<iostream>
#include<string>
using namespace std;int main(){int i,j;string s[i=8],t;for(;i-->0;)getline(cin,s[i]);t="90\n";for(;++i<8;){for(j=0;j<8;)t+=s[j++][i];t+="\n";}t+="180\n";for(;i-->0;){for(j=8;j-->0;)t+=s[7-i][j];t+="\n";}t+="270\n";for(;++i<8;){for(j=8;j-->0;)t+=s[j][7-i];t+="\n";}cout<<t;return 0;}