Problem: Recently Ivan bought a new computer. Excited, he unpacked it and installed his favourite game. With his old computer Ivan had to choose the worst possible graphic settings (because otherwise the framerate would be really low), but now he wants to check, maybe his new computer can perform well even with the best possible graphics?

There are m graphics parameters in the game. i-th parameter can be set to any positive integer from 1 to ai, and initially is set to bi (bi ≤ ai). So there are <image> different combinations of parameters. Ivan can increase or decrease any of these parameters by 1; after that the game will be restarted with new parameters (and Ivan will have the opportunity to check chosen combination of parameters).

Ivan wants to try all p possible combinations. Also he wants to return to the initial settings after trying all combinations, because he thinks that initial settings can be somehow best suited for his hardware. But Ivan doesn't really want to make a lot of restarts.

So he wants you to tell the following:

  * If there exists a way to make exactly p changes (each change either decreases or increases some parameter by 1) to try all possible combinations and return to initial combination, then Ivan wants to know this way. 
  * Otherwise, if there exists a way to make exactly p - 1 changes to try all possible combinations (including the initial one), then Ivan wants to know this way. 



Help Ivan by showing him the way to change parameters!

Input

The first line of input contains one integer number m (1 ≤ m ≤ 6).

The second line contains m integer numbers a1, a2, ..., am (2 ≤ ai ≤ 1000). It is guaranteed that <image>.

The third line contains m integer numbers b1, b2, ..., bm (1 ≤ bi ≤ ai).

Output

If there is a way to make exactly p changes (each change either decreases or increases some parameter by 1) to try all possible combinations and return to initial combination, then output Cycle in the first line. Then p lines must follow, each desribing a change. The line must be either inc x (increase parameter x by 1) or dec x (decrease it).

Otherwise, if there is a way to make exactly p - 1 changes to try all possible combinations (including the initial one), then output Path in the first line. Then p - 1 lines must follow, each describing the change the same way as mentioned above.

Otherwise, output No.

Examples

Input

1
3
1


Output

Path
inc 1
inc 1


Input

1
3
2


Output

No


Input

2
3 2
1 1


Output

Cycle
inc 1
inc 1
inc 2
dec 1
dec 1
dec 2

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
template <typename T>
inline T max(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
inline T min(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline bool repr(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline bool repl(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline T gcd(T a, T b) {
  T t;
  if (a < b) {
    while (a) {
      t = a;
      a = b % a;
      b = t;
    }
    return b;
  } else {
    while (b) {
      t = b;
      b = a % b;
      a = t;
    }
    return a;
  }
}
template <typename T>
inline T sqr(T x) {
  return x * x;
}
struct Cg {
  inline char operator()() { return getchar(); }
};
struct Cp {
  inline void operator()(char x) { putchar(x); }
};
inline bool IS(char x) { return x == 10 || x == 13 || x == ' '; }
template <typename T>
struct Fr {
  T P;
  inline Fr &operator,(int &x) {
    x = 0;
    char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (f) x = -x;
    return *this;
  }
  inline operator int() {
    int x;
    *this, x;
    return x;
  }
  inline Fr &operator,(long long &x) {
    x = 0;
    char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (f) x = -x;
    return *this;
  }
  inline operator long long() {
    long long x;
    *this, x;
    return x;
  }
  inline Fr &operator,(char &x) {
    for (x = P(); IS(x); x = P())
      ;
    return *this;
  }
  inline operator char() {
    char x;
    *this, x;
    return x;
  }
  inline Fr &operator,(char *x) {
    char t = P();
    for (; IS(t); t = P())
      ;
    if (~t) {
      for (; !IS(t) && ~t; t = P()) *x++ = t;
    }
    *x++ = 0;
    return *this;
  }
  inline Fr &operator,(double &x) {
    x = 0;
    char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (t == '.') {
      double u = 0.1;
      for (t = P(); t >= '0' && t <= '9'; t = P(), u *= 0.1) x += u * (t - '0');
    }
    if (f) x = -x;
    return *this;
  }
  inline operator double() {
    double x;
    *this, x;
    return x;
  }
  inline Fr &operator,(long double &x) {
    x = 0;
    char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (t == '.') {
      double u = 0.1;
      for (t = P(); t >= '0' && t <= '9'; t = P(), u *= 0.1) x += u * (t - '0');
    }
    if (f) x = -x;
    return *this;
  }
  inline operator long double() {
    long double x;
    *this, x;
    return x;
  }
  inline Fr &operator,(unsigned int &x) {
    x = 0;
    char t = P();
    while (t < '0' || t > '9') t = P();
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    return *this;
  }
  inline operator unsigned int() {
    unsigned int x;
    *this, x;
    return x;
  }
  inline Fr &operator,(unsigned long long &x) {
    x = 0;
    char t = P();
    while (t < '0' || t > '9') t = P();
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    return *this;
  }
  inline operator unsigned long long() {
    unsigned long long x;
    *this, x;
    return x;
  }
};
Fr<Cg> in;
template <typename T>
struct Fw {
  T P;
  inline Fw &operator,(int x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator()(int x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator,(unsigned int x) {
    if (x) {
      char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator()(unsigned int x) {
    if (x) {
      char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator,(long long x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      char s[19], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator()(long long x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      char s[19], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator,(unsigned long long x) {
    if (x) {
      char s[20], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator()(unsigned long long x) {
    if (x) {
      char s[20], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  inline Fw &operator,(char x) {
    P(x);
    return *this;
  }
  inline Fw &operator()(char x) {
    P(x);
    return *this;
  }
  inline Fw &operator,(const char *x) {
    while (*x) P(*x++);
    return *this;
  }
  inline Fw &operator()(const char *x) {
    while (*x) P(*x++);
    return *this;
  }
  inline Fw &operator()(double x, int y) {
    if (y) {
      double t = 0.5;
      for (int i = y; i--;) t *= 0.1;
      if (x >= 0)
        x += t;
      else
        x -= t, P('-');
      *this, (long long)(abs(x));
      P('.');
      if (x < 0) x = -x;
      while (y--) {
        x *= 10;
        x -= floor(x * 0.1) * 10;
        P(((int)x) % 10 + '0');
      }
    } else if (x >= 0)
      *this, (long long)(x + 0.5);
    else
      *this, (long long)(x - 0.5);
    ;
    return *this;
  }
  inline Fw &operator()(long double x, int y) {
    if (y) {
      double t = 0.5;
      for (int i = y; i--;) t *= 0.1;
      if (x >= 0)
        x += t;
      else
        x -= t, P('-');
      *this, (long long)(abs(x));
      P('.');
      if (x < 0) x = -x;
      while (y--) {
        x *= 10;
        x -= floor(x * 0.1) * 10;
        P(((int)x) % 10 + '0');
      }
    } else if (x >= 0)
      *this, (long long)(x + 0.5);
    else
      *this, (long long)(x - 0.5);
    ;
    return *this;
  }
};
Fw<Cp> out;
const int N = 100007;
int n, a[6], b[6], c[6], oa[6], id[6], x[N], y[N], z[N];
std::vector<int> u[6];
inline void solveCycle() {
  out, "Cycle\n";
  int xc, yc = 0;
  xc = a[0];
  for (int i = 0, iend = xc; i < iend; i++) x[i] = 1;
  for (int pos = 1, posend = n - 1; pos <= posend; pos++) {
    for (int i = 0, iend = xc - 1; i < iend; i++) y[yc++] = x[i];
    y[yc++] = pos + 1;
    for (int i = xc - 1; i; i--) {
      if (~i & 1) {
        for (int j = 0, jend = a[pos] - 2; j < jend; j++) y[yc++] = -pos - 1;
        y[yc++] = -x[i - 1];
      } else {
        for (int j = 0, jend = a[pos] - 2; j < jend; j++) y[yc++] = pos + 1;
        y[yc++] = -x[i - 1];
      }
    }
    for (int j = 0, jend = a[pos] - 1; j < jend; j++) y[yc++] = -pos - 1;
    memcpy(x, y, sizeof(x));
    xc = yc;
    yc = 0;
  }
  int i = 0;
  for (int j = 0, jend = n; j < jend; j++) c[j] = 1;
  while (1) {
    bool flag = 0;
    for (int j = 0, jend = n; j < jend; j++)
      if (b[j] != c[j]) flag = 1;
    if (!flag) break;
    c[abs(x[i]) - 1] += x[i] > 0 ? 1 : -1;
    i++;
  }
  for (int j = 0, jend = xc; j < jend; j++) {
    out, x[(i + j) % xc] > 0 ? "inc" : "dec", ' ', id[abs(x[(i + j) % xc]) - 1],
        '\n';
  }
}
inline int hash() {
  int res = 0;
  for (int j = 0, jend = n; j < jend; j++) res = res * oa[j] + c[j] - 1;
  return res;
}
inline void solvePath() {
  out, "Path\n";
  memcpy(c, b, sizeof(c)), memcpy(oa, a, sizeof(oa));
  for (int i = 0, iend = n; i < iend; i++)
    for (int j = 0, jend = a[i]; j < jend; j++) u[i].push_back(i + 1);
  for (int i = 0, iend = n; i < iend; i++) b[i]--;
  while (1) {
    bool flag = 0;
    for (int i = 0, iend = n; i < iend; i++)
      for (int j = i + 1, jend = n; j <= jend; j++)
        if (a[i] && a[j] && (~(b[i] ^ b[j]) & 1)) {
          flag = 1;
          int xc = 0, yc = 0, zc = 0;
          for (__typeof(u[i].end()) k = u[i].begin(); k != u[i].end(); ++k)
            x[xc++] = *k;
          for (__typeof(u[j].end()) k = u[j].begin(); k != u[j].end(); ++k)
            y[yc++] = *k;
          if (~b[i] & 1) {
            if (b[i] && b[j] && (b[i] + 1 != a[i] || b[j] + 1 == a[j])) {
              for (int k = (b[i]) - 1; ~k; k--) z[zc++] = -x[k];
              for (int k = (b[j]) - 1; ~k; k--) z[zc++] = -y[k];
              for (int k = 0, kend = b[i]; k < kend; k++) {
                z[zc++] = x[k];
                if (~k & 1) {
                  for (int l = 0, lend = b[j] - 1; l < lend; l++)
                    z[zc++] = y[l];
                } else {
                  for (int l = (b[j] - 1) - 1; ~l; l--) z[zc++] = -y[l];
                }
              }
            }
            if (b[i] + 1 < a[i] && b[j]) {
              if (!b[i])
                for (int k = (b[j]) - 1; ~k; k--) z[zc++] = -y[k];
              for (int k = b[i], kend = a[i] - 2; k <= kend; k++)
                z[zc++] = x[k];
              for (int k = 0, kend = b[j]; k < kend; k++) {
                z[zc++] = y[k];
                if (~k & 1) {
                  for (int l = a[i] - 2, lend = b[i] + 1; l >= lend; l--)
                    z[zc++] = -x[l];
                } else {
                  for (int l = b[i] + 1, lend = a[i] - 2; l <= lend; l++)
                    z[zc++] = x[l];
                }
              }
            }
            if (b[i] + 1 < a[i] && b[j] + 1 < a[j]) {
              if (!b[j])
                for (int k = b[i], kend = a[i] - 2; k <= kend; k++)
                  z[zc++] = x[k];
              for (int k = b[j], kend = a[j] - 2; k <= kend; k++)
                z[zc++] = y[k];
              for (int k = a[i] - 2, kend = b[i]; k >= kend; k--) {
                z[zc++] = -x[k];
                if (k & 1) {
                  for (int l = a[j] - 2, lend = b[j] + 1; l >= lend; l--)
                    z[zc++] = -y[l];
                } else {
                  for (int l = b[j] + 1, lend = a[j] - 2; l <= lend; l++)
                    z[zc++] = y[l];
                }
              }
            }
            if (b[i] && b[j] + 1 < a[j]) {
              if (b[i] + 1 == a[i])
                for (int k = b[j], kend = a[j] - 2; k <= kend; k++)
                  z[zc++] = y[k];
              for (int k = (b[i]) - 1; ~k; k--) z[zc++] = -x[k];
              for (int k = a[j] - 2,
                       kend = (b[j] && (b[i] + 1 != a[i] || b[j] + 1 == a[j])
                                   ? b[j] + 1
                                   : b[j]);
                   k >= kend; k--) {
                z[zc++] = -y[k];
                if (k & 1) {
                  for (int l = 0, lend = b[i] - 1; l < lend; l++)
                    z[zc++] = x[l];
                } else {
                  for (int l = (b[i] - 1) - 1; ~l; l--) z[zc++] = -x[l];
                }
              }
            }
            if (b[i] + 1 == a[i] && b[j] + 1 != a[j]) {
              for (int k = (b[j]) - 1; ~k; k--) z[zc++] = -y[k];
              for (int k = 0, kend = b[i]; k < kend; k++) {
                z[zc++] = x[k];
                if (~k & 1) {
                  for (int l = 0, lend = b[j] - 1; l < lend; l++)
                    z[zc++] = y[l];
                } else {
                  for (int l = (b[j] - 1) - 1; ~l; l--) z[zc++] = -y[l];
                }
              }
            }
          } else {
            for (int k = (b[i]) - 1; ~k; k--) z[zc++] = -x[k];
            z[zc++] = -y[b[j] - 1];
            for (int k = 0, kend = b[i]; k < kend; k++) {
              if (k & 1) {
                for (int l = 0, lend = b[j] - 1; l < lend; l++) z[zc++] = y[l];
              } else {
                for (int l = (b[j] - 1) - 1; ~l; l--) z[zc++] = -y[l];
              }
              z[zc++] = x[k];
            }
            for (int k = 0, kend = b[j]; k < kend; k++) {
              if (k & 1) {
                for (int l = a[i] - 2, lend = b[i]; l >= lend; l--)
                  z[zc++] = -x[l];
              } else {
                for (int l = b[i], lend = a[i] - 2; l <= lend; l++)
                  z[zc++] = x[l];
              }
              z[zc++] = y[k];
            }
            for (int k = a[i] - 2, kend = b[i]; k >= kend; k--) {
              if (~k & 1) {
                for (int l = a[j] - 2, lend = b[j]; l >= lend; l--)
                  z[zc++] = -y[l];
              } else {
                for (int l = b[j], lend = a[j] - 2; l <= lend; l++)
                  z[zc++] = y[l];
              }
              z[zc++] = -x[k];
            }
            for (int k = a[j] - 2, kend = b[j] + 1; k >= kend; k--) {
              if (~k & 1) {
                for (int l = 0, lend = b[i]; l < lend; l++) z[zc++] = x[l];
              } else {
                for (int l = (b[i]) - 1; ~l; l--) z[zc++] = -x[l];
              }
              z[zc++] = -y[k];
            }
            for (int k = (b[i]) - 1; ~k; k--) z[zc++] = -x[k];
          }
          u[i].clear();
          for (int k = 0, kend = zc; k < kend; k++) u[i].push_back(z[k]);
          a[i] *= a[j];
          b[i] = 0;
          a[j] = 0;
          goto ok;
        }
  ok:;
    if (!flag) break;
  }
  for (__typeof(u[0].end()) i = u[0].begin(); i != u[0].end(); ++i)
    out, *i > 0 ? "inc" : "dec", ' ', id[abs(*i) - 1], '\n';
  std::set<int> vis;
  vis.insert(hash());
  for (__typeof(u[0].end()) i = u[0].begin(); i != u[0].end(); ++i) {
    c[abs(*i) - 1] += *i > 0 ? 1 : -1;
    vis.insert(hash());
  }
  assert(vis.size() == a[0]);
}
int main() {
  in, n;
  for (int i = 0, iend = n; i < iend; i++) in, a[i];
  for (int i = 0, iend = n; i < iend; i++) in, b[i];
  int c = 0;
  for (int i = 0, iend = n; i < iend; i++) {
    if (a[i] > 1) {
      a[c] = a[i];
      b[c] = b[i];
      id[c] = i + 1;
      c++;
    }
  }
  n = c;
  if (n == 1) {
    if (a[0] == 2) {
      out, "Cycle\n";
      if (b[0] == 1)
        out, "inc 1\ndec 1\n";
      else
        out, "dec 1\ninc 1\n";
    } else if (b[0] == 1) {
      out, "Path\n";
      for (int i = 0, iend = a[0] - 1; i < iend; i++) out, "inc", ' ', 1, '\n';
    } else if (b[0] == a[0]) {
      out, "Path\n";
      for (int i = 0, iend = a[0] - 1; i < iend; i++) out, "dec", ' ', 1, '\n';
    } else {
      out, "No\n";
    }
    return 0;
  }
  for (int i = 0, iend = n; i < iend; i++)
    if (~a[i] & 1) {
      if (i)
        std::swap(a[0], a[i]), std::swap(b[0], b[i]), std::swap(id[0], id[i]);
      return solveCycle(), 0;
    }
  int t = 0;
  for (int i = 0, iend = n; i < iend; i++) t ^= b[i] - 1;
  if (t & 1) {
    out, "No\n";
    return 0;
  }
  solvePath();
}