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>
using namespace std;
int n;
int a[6], b[6], ord[6], c[6];
vector<pair<int, int> > v, nv;
struct S {
  vector<pair<int, int> > v;
  int from;
  S(vector<pair<int, int> > v, int from) : v(v), from(from) {}
  S() {}
};
vector<S> s;
void pr(int a, int b) {
  if (a == 1) {
    printf("inc %d\n", ord[b] + 1);
  } else {
    printf("dec %d\n", ord[b] + 1);
  }
}
S hor, ver, res;
bool invI, invJ;
void _incI() {
  assert(ver.from < (int)ver.v.size());
  res.v.push_back(ver.v[ver.from++]);
}
void _decI() {
  assert(ver.from > 0);
  pair<int, int> p = ver.v[--ver.from];
  p.first = -p.first;
  res.v.push_back(p);
}
void _incJ() {
  assert(hor.from < (int)hor.v.size());
  res.v.push_back(hor.v[hor.from++]);
}
void _decJ() {
  assert(hor.from > 0);
  pair<int, int> p = hor.v[--hor.from];
  p.first = -p.first;
  res.v.push_back(p);
}
void decI() {
  if (invI)
    _incI();
  else
    _decI();
}
void incI() {
  if (invI)
    _decI();
  else
    _incI();
}
void decJ() {
  if (invJ)
    _incJ();
  else
    _decJ();
}
void incJ() {
  if (invJ)
    _decJ();
  else
    _incJ();
}
S merge() {
  res.v.clear();
  res.from = 0;
  int i = ver.from;
  int j = hor.from;
  int n = (int)ver.v.size() + 1;
  int m = (int)hor.v.size() + 1;
  assert(i % 2 == j % 2);
  invI = invJ = false;
  if (i % 2 == 1) {
    for (int jj = j; jj >= 0; --jj) {
      if (jj & 1) {
        for (int _ = 0; _ < (int)(i); ++_) decI();
      } else {
        for (int _ = 0; _ < (int)(i); ++_) incI();
      }
      if (jj != 0)
        decJ();
      else
        incI();
    }
    for (int ii = i + 1; ii < n; ++ii) {
      if (ii & 1) {
        for (int _ = 0; _ < (int)(j); ++_) decJ();
      } else {
        for (int _ = 0; _ < (int)(j); ++_) incJ();
      }
      if (ii != n - 1)
        incI();
      else
        incJ();
    }
    for (int jj = j + 1; jj < m; ++jj) {
      if (jj & 1) {
        for (int _ = 0; _ < (int)(n - 1); ++_) incI();
      } else {
        for (int _ = 0; _ < (int)(n - 1); ++_) decI();
      }
      if (jj != m - 1) incJ();
    }
  } else {
    if (i == n - 1) {
      i = 0;
      invI = true;
    }
    if (j == 0) {
      j = m - 1;
      invJ = true;
    }
    for (int _ = 0; _ < (int)(i); ++_) decI();
    decJ();
    for (int ii = 0; ii < (int)(i + 1); ++ii) {
      if (ii & 1) {
        for (int _ = 0; _ < (int)(j - 1); ++_) incJ();
      } else {
        for (int _ = 0; _ < (int)(j - 1); ++_) decJ();
      }
      incI();
    }
    for (int jj = 0; jj < (int)(j + 1); ++jj) {
      if (jj & 1) {
        for (int _ = 0; _ < (int)(n - i - 2); ++_) decI();
      } else {
        for (int _ = 0; _ < (int)(n - i - 2); ++_) incI();
      }
      if (jj != j) incJ();
    }
    if (j != m - 1) {
      incJ();
      for (int jj = j + 1; jj < m; ++jj) {
        if (jj & 1) {
          for (int _ = 0; _ < (int)(n - 1); ++_) decI();
        } else {
          for (int _ = 0; _ < (int)(n - 1); ++_) incI();
        }
        if (jj != m - 1) incJ();
      }
    }
  }
  return res;
}
int main() {
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) cin >> a[i];
  for (int i = 0; i < (int)(n); ++i) cin >> b[i];
  if (n == 1) {
    if (a[0] == 2) {
      cout << "Cycle" << endl;
      if (b[0] == 1) {
        cout << "inc 1" << endl;
        cout << "dec 1" << endl;
      } else {
        cout << "dec 1" << endl;
        cout << "inc 1" << endl;
      }
    } else {
      if (b[0] == 1) {
        cout << "Path" << endl;
        for (int i = 0; i < (int)(a[0] - 1); ++i) {
          cout << "inc 1\n";
        }
      } else if (b[0] == a[0]) {
        cout << "Path" << endl;
        for (int i = 0; i < (int)(a[0] - 1); ++i) {
          cout << "dec 1\n";
        }
      } else {
        cout << "No" << endl;
      }
    }
    return 0;
  }
  for (int i = 0; i < (int)(n); ++i) ord[i] = i;
  for (int i = 0; i < (int)(n - 1); ++i)
    if (a[i] % 2 == 0) {
      swap(a[i], a[n - 1]);
      swap(b[i], b[n - 1]);
      swap(ord[i], ord[n - 1]);
      break;
    }
  if (a[n - 1] % 2 == 0) {
    for (int i = 0; i < (int)(n - 1); ++i) {
      nv.clear();
      for (int j = 0; j < (int)(a[i]); ++j) {
        if (j & 1) {
          reverse(v.begin(), v.end());
          for (pair<int, int> p : v) {
            nv.push_back(make_pair(-p.first, p.second));
          }
          reverse(v.begin(), v.end());
        } else {
          for (pair<int, int> p : v) {
            nv.push_back(p);
          }
        }
        if (j != a[i] - 1) {
          nv.push_back(make_pair(1, i));
        }
      }
      v = nv;
    }
    nv.clear();
    for (pair<int, int> p : v) {
      nv.push_back(p);
    }
    for (int i = 0; i < (int)(a[n - 1] - 1); ++i) {
      nv.push_back(make_pair(1, n - 1));
      if (i & 1) {
        for (int j = 1; j < (int)v.size(); ++j) {
          nv.push_back(v[j]);
        }
      } else {
        for (int j = (int)v.size() - 1; j >= 1; --j) {
          nv.push_back(make_pair(-v[j].first, v[j].second));
        }
      }
    }
    nv.push_back(make_pair(-v[0].first, v[0].second));
    for (int i = 0; i < (int)(a[n - 1] - 1); ++i) {
      nv.push_back(make_pair(-1, n - 1));
    }
    for (int i = 0; i < (int)(n); ++i) c[i] = 1;
    v = nv;
    int ind = 0;
    while (true) {
      bool ok = true;
      for (int j = 0; j < (int)(n); ++j)
        if (c[j] != b[j]) {
          ok = false;
          break;
        }
      if (ok) break;
      c[v[ind].second] += v[ind].first;
      ++ind;
    }
    printf("Cycle\n");
    for (int i = ind; i < (int)v.size(); ++i) {
      pr(v[i].first, v[i].second);
    }
    for (int i = 0; i < ind; ++i) {
      pr(v[i].first, v[i].second);
    }
    return 0;
  }
  int sum = 0;
  for (int i = 0; i < (int)(n); ++i) sum += b[i] - 1;
  if (sum % 2 == 1) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Path" << endl;
  for (int i = 0; i < (int)(n); ++i) {
    vector<pair<int, int> > cur;
    for (int j = 0; j < (int)(a[i] - 1); ++j) {
      cur.push_back(make_pair(1, i));
    }
    s.push_back(S(cur, b[i] - 1));
  }
  while ((int)s.size() > 1) {
    bool done = false;
    for (int i = 0; i < (int)(s.size()); ++i) {
      for (int j = 0; j < (int)(i); ++j) {
        if ((s[i].from + s[j].from) % 2 == 0) {
          hor = s[i];
          ver = s[j];
          s[i] = merge();
          swap(s[j], s.back());
          s.pop_back();
          done = true;
          break;
        }
      }
      if (done) {
        break;
      }
    }
    assert(done);
  }
  for (pair<int, int> p : s[0].v) {
    pr(p.first, p.second);
  }
  return 0;
}