#include <bits/stdc++.h>
using namespace std;
int N, M, K;
vector<int> edge[252525];
int d[252525];
int p[252525];
vector<int> eds;
void dfs(int node, int depth) {
  d[node] = depth;
  if (depth >= ((N + K - 1) / K)) {
    int now = node;
    printf("PATH\n");
    printf("%d\n", depth);
    while (now != 1) {
      printf("%d ", now);
      now = p[now];
    }
    printf("1\n");
    exit(0);
  }
  int flag = 0;
  for (auto i : edge[node]) {
    if (d[i]) continue;
    flag = 1;
    p[i] = node;
    dfs(i, depth + 1);
  }
  if (!flag) eds.push_back(node);
}
int main() {
  scanf("%d %d %d", &N, &M, &K);
  for (int i = 0; i < M; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    edge[a].push_back(b);
    edge[b].push_back(a);
  }
  p[1] = 1;
  dfs(1, 1);
  printf("CYCLES\n");
  for (int i = 0; i < K; i++) {
    vector<int> tempans;
    tempans.push_back(eds[i]);
    int now = eds[i];
    int temp = 0;
    for (int j = 0; j < 3; j++) {
      if (edge[now][j] == p[now]) continue;
      if (temp) {
        int ttemp = edge[now][j];
        if (d[now] - d[ttemp] > 2 && (d[now] - d[ttemp] - 2) % 3 != 0) {
          now = p[now];
          while (now != ttemp) {
            tempans.push_back(now);
            now = p[now];
          }
          tempans.push_back(ttemp);
          break;
        }
        if (d[ttemp] > d[temp]) swap(temp, ttemp);
        while (temp != ttemp) {
          tempans.push_back(temp);
          temp = p[temp];
        }
        tempans.push_back(ttemp);
        break;
      } else {
        temp = edge[now][j];
        if (d[now] - d[temp] > 2 && (d[now] - d[temp] - 2) % 3 != 0) {
          now = p[now];
          while (now != temp) {
            tempans.push_back(now);
            now = p[now];
          }
          tempans.push_back(temp);
          break;
        }
      }
    }
    printf("%d\n", (int)tempans.size());
    if (tempans.size() % 3 == 0) return tempans.size();
    for (auto j : tempans) {
      printf("%d ", j);
    }
    printf("\n");
  }
  return 0;
}
