#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const int is = 1 << 14;
char ib[is], *ip = ib + is, it;
inline char getc() {
  if (ip == ib + is) {
    fread_unlocked(ib, 1, is, stdin);
    ip = ib;
  }
  return *ip++;
}
inline int read() {
  int r = 0;
  if (ip + 16 > ib + is)
    while ((it = getc()) & 16) r = r * 10 + it - '0';
  else
    while ((it = *ip++) & 16) r = r * 10 + it - '0';
  return r;
}
const int os = 1 << 14;
char ob[os], *op = ob, ot;
inline void putc(const char c) {
  *op++ = c;
  if (op == ob + os) {
    fwrite_unlocked(ob, 1, os, stdout);
    op = ob;
  }
}
inline void write(int x) {
  char d[6];
  int i = 0;
  while (true) {
    d[i] = x % 10 + 48;
    x /= 10;
    ++i;
    if (x <= 0) break;
  }
  while (i--) {
    putc(d[i]);
  }
}
signed main() { fwrite_unlocked(ob, 1, op - ob, stdout); }
