This documentation is automatically generated by online-judge-tools/verification-helper
#include "icpc/dice.hpp"
#pragma once
#include "icpc/template.hpp"
// https://onlinejudge.u-aizu.ac.jp/problems/2703
// d = {x-, x+, y-, y+, z-, z+}
// d = {0, 1, 2, 3, 4, 5}
struct Dice {
vector<long long> d;
Dice(vector<long long> &d) : d(d) {}
void right() { d = {d[2], d[3], d[1], d[0], d[4], d[5]}; }
void left() { REP(i, 3) right(); }
void xm() { d = {d[5], d[4], d[2], d[3], d[0], d[1]}; }
void xp() { REP(i, 3) xm(); }
void ym() { d = {d[0], d[1], d[5], d[4], d[2], d[3]}; }
void yp() { REP(i, 3) ym(); }
};
#line 2 "icpc/dice.hpp"
#line 2 "icpc/template.hpp"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (n); i++)
template <class T> using V = vector<T>;
template <class T> ostream& operator<<(ostream& os, const V<T>& v) {
os << "[ ";
for (auto& vi : v) os << vi << ", ";
return os << "]";
}
#ifdef LOCAL
#define show(x) cerr << __LINE__ << " : " << #x << " = " << x << endl;
#else
#define show(x) true
#endif
using uint = unsigned int;
using ull = unsigned long long;
// g++ -g -fsanitize=undefined,address -DLOCAL -std=gnu++17
#line 4 "icpc/dice.hpp"
// https://onlinejudge.u-aizu.ac.jp/problems/2703
// d = {x-, x+, y-, y+, z-, z+}
// d = {0, 1, 2, 3, 4, 5}
struct Dice {
vector<long long> d;
Dice(vector<long long> &d) : d(d) {}
void right() { d = {d[2], d[3], d[1], d[0], d[4], d[5]}; }
void left() { REP(i, 3) right(); }
void xm() { d = {d[5], d[4], d[2], d[3], d[0], d[1]}; }
void xp() { REP(i, 3) xm(); }
void ym() { d = {d[0], d[1], d[5], d[4], d[2], d[3]}; }
void yp() { REP(i, 3) ym(); }
};