#include #include #include class xrand { uint64_t x; public: using result_type = uint32_t; static constexpr result_type min() { return std::numeric_limits::min(); } static constexpr result_type max() { return std::numeric_limits::max(); } xrand(uint64_t k) : x(k) {} xrand() : xrand(1) {} result_type operator()() { x ^= x << 9; x ^= x >> 7; return (x * 0x123456789abcdef) >> 32; } }; int main() { std::random_device rng_seed; xrand rng(uint64_t(rng_seed()) << 32 | rng_seed()); std::vector order(36); std::iota(order.begin(), order.end(), 0); std::shuffle(order.begin(), order.end(), rng); for (int i = 0; i < 35; i++) { std::array dice; for (auto &&d : dice) { std::cin >> d; } std::cout << order.at(i) / 6 + 1 << ' ' << order.at(i) % 6 + 1 << '\n'; } return 0; }