#ifdef LOCAL
//#define _GLIBCXX_DEBUG
// #pragma comment(linker, "/STACK:102400000,102400000") // 在 Windows 上有效
#endif
#pragma GCC optimize("Ofast") // Ofast 等效于 -O3 -ffast-math
#include <bits/stdc++.h>

using namespace std;

#define FAST_READ ios::sync_with_stdio(false); cin.tie(nullptr);
#ifdef LOCAL
#define see(x) cout  <<"<DBG> " << #x << ": " << (x) << endl
#endif
#ifndef LOCAL
#define see(x)
#endif

template<typename T> void dprintln(const T &t) { cout << t << endl; } // for debug use
template<typename T, typename ...Args> void dprintln(const T &t, const Args &...rest) { cout << t << ' '; dprintln(rest...); }
template<typename T> void println(const T &t) { cout << t << '\n'; }
template<typename T, typename ...Args> void println(const T &t, const Args &...rest) { cout << t << ' '; println(rest...); }

template<typename T> void print(const T &t) { cout << t << ' '; }

template<typename T, typename ...Args> void print(const T &t, const Args &...rest) { cout << t << ' '; print(rest...); }

// this overload is chosen when there's only one argument
template<class T> void scan(T &t) { cin >> t; }
template<class T, class ...Args> void scan(T &a, Args &...rest) { cin >> a; scan(rest...); }
template <typename T> void read(vector<T> &vec) {for(auto &x: vec) cin >> x;}
using ull = unsigned long long;
using ll = long long;
using ul = unsigned long;
using vl = vector<ll>;
using vi = vector<int>;
using pii = pair<int,int>;
using vb = vector<bool>;
using vpii = vector<pii>;
template <typename int_t>
inline int_t lowbit(int_t x) {return x & -x;}
#define rng(i, a, b) for(int i = (a); i < (b); ++i)
#define down(i, b, a) for (int i = (b); i >= (a); i--)
#define rep(n) for(int _ = 0, __ = (int)n; _ < __; _++)
#define stp(i, a, b, c) for (int i = (a); i < (b); i += (c))
#define FOR(x, cont) for (const auto &x: cont)
#define For(x, cont) for (auto &x: cont)
#define all(x) begin(x), end(x)
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define SZ(x) (int)(x).size()
template <typename T, typename Comp = less<T>>
using pq = priority_queue<T, vector<T>, Comp>;
#define popcnt(x) __builtin_popcountll((x))
#define SET(arr, v) memset(arr, (v), sizeof (arr))
#define UNIQ(vec) (vec).erase(unique(all(vec)), end(vec))
#define LB(cont, x) int(lower_bound(all(cont), x) - begin(cont))
#define AI(name, n, m) vv<int> name(n, vi(m));
#define AL(name, n, m) vv<ll> name(size_t(n), vl(size_t(m)));
auto bet = [](const ll x, const ll y, const ll i) {
    return x <= i && i <= y;
};

template<typename T1, typename T2>
T1 ceil(T1 x, T2 y) { // y >= 1，是整数。需要注意 x + y - 1 是否会溢出
    return (x + y - 1) / y;
}

inline int h_bit(unsigned long long x) {
    return sizeof(unsigned long long) * 8 - 1 - __builtin_clzll(x);
}
int pow2(int x){ // power of 2
    return 1 << (h_bit((ull)x) + (x != lowbit(x)));
}

template <typename T>
struct bit {
    vector<T> a;
    function<T(T,T)> bin_op = [](const T &a, const T &b){return max(a, b);};
    explicit bit(int n, int v = 0) {
        a.resize((ul)n + 1);
        for (int i = 1; i <= n; ++i) a[i] = v;
    }

    T prefix(T x) {
        T res = 0;
        while (x) {
            res = bin_op(res, a[x]);
//            res += a[x];
            x -= x & -x;
        }
        return res;
    }

    T sum(int l, int r) {
        if (l > r) return 0;
        return sum(r) - sum(l - 1);
    }

    void modify(int x, T v) {
        while (x < a.size()) {
            a[x] = bin_op(a[x], v);
            x += x & -x;
        }
    }
    void clear(){
        fill(a.begin(), a.end(), 0);
    }
};

template <typename T>
struct r_bit {
    vector<T> a;
    function<T(T,T)> bin_op = [](const T &a, const T &b){return max(a, b);};

    explicit r_bit(int n, int v = 0) {
        a.resize((ul)n + 1);
        for (int i = 1; i <= n; ++i) a[i] = v;
    }

    T suffix(T x) {
        T res = 0;
        while (x < a.size()) {
            res = bin_op(res, a[x]);
//            res += a[x];
            x += x & -x;
        }
        return res;
    }

    T sum(int l, int r) {
        if (l > r) return 0;
        return sum(r) - sum(l - 1);
    }

    void modify(int x, T v) {
        while (x > 0) {
            a[x] = bin_op(a[x], v);
            x -= x & -x;
        }
    }
    void clear(){
        fill(a.begin(), a.end(), 0);
    }
};

vi get_prime(int n) {
    vi minp((ul)n + 1), p;
    for (int i = 2; i <= n; i++) {
        if (!minp[i]) {
            minp[i] = i;
            p.pb(i);
        }
        FOR(x, p) {
            if (x <= minp[i] && x * i <= n)
                minp[x * i] = x;
            else break;
        }
    }
    return p;
}

const int mod = 998244353; //记住 mod 的行号！

inline void mul(int &x, const int y) {
    x = int(ll(x) * y % mod);
}
inline int Mul(int x, const int y) {
    return (int)(ll(x) * y % mod);
}
inline void add(int &x, const int y) {
    x += y;
    if (x >= mod) x -= mod;
}
inline int Add(int x, int y) {
    x += y;
    if (x >= mod) x -= mod;
    return x;
}
inline int Sub(int x, int y) {
    x -= y; if (x < 0) x += mod;
    return x;
}
inline ll submod(ll x, ll y) {
    return x >= y ? x - y : x - y + mod;
}
inline ll addmod(ll x, ll y) {
    x += y;
    return x >= mod ? x - mod : x;
}

inline void sub_mod(ll &x, const ll y) {
    x -= y;
    if (x < 0) x += mod;
}
// alias templates
template<typename T> using vv = vector<vector<T>>;
template <typename T1, typename T2 = T1> using vp = vector<pair<T1,T2>>;
template<typename T, int n> using va = vector<array<T,n>>;

#ifdef __GNUC__
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
template <typename T>
using rank_tree = __gnu_pbds::tree<
        T,
        __gnu_pbds::null_type,
        less<T>,
        __gnu_pbds::rb_tree_tag,
        __gnu_pbds::tree_order_statistics_node_update>;
#endif

//union-find 并查集
struct UF{
    vi par, sz;
    int tot;
    explicit UF(int n) { //0-indexed
        par.assign(n, 0);
        sz.assign(n, 1);
        rng (i, 0, n) par[i] = i;
        tot = n;
    }

    int find(int x) {
        return x == par[x] ? x : par[x] = find(par[x]);
    }
    bool unite(int x, int y) {
        int rx = find(x), ry = find(y);
        if(rx != ry) {
            par[rx] = ry;
            --tot;
            return true;
        }
        return false;
    }
};

int fp (int x, ll n) { //fast power: hat off to quailty
    if(n < 0) {
        x = fp(x, mod - 2);
        n = -n;
    }
    int ans = 1;
    while(n){
        if(n&1) mul(ans, x);
        n /= 2;
        mul(x, x);
    }
    return ans;
}

vi get_popcnt(int n) {
    vi res((ul)n + 1);
    rng (i, 0, n) {
        if (i * 2 <= n) res[i * 2] = res[i];
        if ((i & 1) == 0) res[i + 1] = res[i] + 1;
    }
    return res;
}

using idx_t = long;
template <typename  T, typename Compare = std::less<T>>
struct ST{
    size_t n; // 0-indexed
    vv<T> a;
    template <typename ptr_t>
    ST(ptr_t beg, ptr_t end):n(end-beg){
        a.resize((size_t)h_bit(n)+1); // 注意：不能写成 h_bit(n)
        a[0].assign(beg, end);
        rng (i, 0, SZ(a)-1) {
            a[i+1].resize(n);
            rng(j, 0, n - (1 << i)) {
                a[i+1][j] = min(a[i][j], a[i][j+(1<<i)], Compare());
            }
            rng(j, n-(1 << i), n) {
                a[i+1][j] = a[i][j];
            }
        }
    }

    T query(idx_t l, idx_t r) { // l <=  r
        int i = h_bit(r - l + 1ul);
        return min(a[i][l], a[i][r+1-(1<<i)], Compare());
    }
};

using poly = vector<int>;

void bit_reverse_swap(vector<int> &a) {
    int n = SZ(a);
    for (int i = 1, j = n >> 1, k; i < n - 1; i++) {
        if (i < j) swap(a[i], a[j]);
        //tricky
        for (k = n >> 1; j >= k; j -= k, k >>= 1);    //inspect the highest "1"
        j += k;
    }
}

void FFT(vector<int> &a, int type) {
    bit_reverse_swap(a);
    int n = SZ(a);
    for (int i = 2; i <= n; i *= 2) {
        const auto wi = fp(3, type * (mod - 1) / i); // i次单位根
        for (int j = 0; j < n; j += i) {
            auto w(1);
            for (int k = j, h = i >> 1; k < j + h; k++) {
                auto t = Mul(w, a[k + h]), u = a[k];
                a[k] = Add(u, t);
                a[k + h] = Sub(u, t);
                mul(w, wi);
            }
        }
    }
    const int inv = fp(n, -1);
    if (type == -1) for (auto &x : a) mul(x, inv);
}

void fp(poly &a, const int n) {
    a.resize((ul)pow2((SZ(a)-1) * n + 1));
    FFT(a, 1);
    for(auto &x: a) x = fp(x, n);
    FFT(a, -1);
}
// DEBUG code by tourist
string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
// end DEBUG

// ZJU Monthly Jan.19
///////////////////////////////////////////////////////
const int N = (int)2e3+5, M = 1005;

vv<int> g;
vi dep, fa;

vb is_leaf;
vv<int> back;

void dfs(int u, int f) {
    fa[u] = f;
    dep[u] = dep[f] + 1;
    FOR(v, g[u]) {
        if (dep[v] == 0) {
            dfs(v, u);
            is_leaf[u] = false;
        }
        else if (dep[v] < dep[u] && v != f) {
            back[u].pb(v);
        }
    }
}

int main() {
    FAST_READ
#ifdef LOCAL
    ifstream in("main.in");
    cin.rdbuf(in.rdbuf());
#endif

    int n, m, k; scan(n, m, k);

    g.resize(n+1);
    dep.resize(n + 1), fa.resize(n + 1);
    is_leaf.resize(n + 1, true);
    back.resize(n + 1);

    int tar = (n + k - 1) / k;
    rep(m) {
        int u, v; scan(u, v);
        g[u].pb(v), g[v].pb(u);
    }

    dfs(1, 0);

    rng (i, 1, n + 1) if(dep[i] >= tar) {
        println("PATH");
        println(dep[i]);
        for (; i; print(i), i = fa[i]);
        cout << endl;
        return 0;
    }

    // l * (d - 1) + 1 >= n
    // d < ceil(n / k) iff. d * k < n iff. d * k <= n - 1
    // l >= (n - 1) / (d - 1) >= d * k / (d - 1) > k

    println("CYCLES");
    for (int i = 1, c = 0; i <= n && c < k; ++i) if (is_leaf[i]) {
            ++c;
            int u = back[i][0], v = back[i][1];
            bool flag = false;
            rng (j, 0, 2) {
                int x = back[i][j];
                int len = dep[i] - dep[x] + 1;
                if (len % 3) {
                    flag = true;
                    println(len);
                    for (int y = x; ; y=fa[y]) {
                        print(x);
                        if (y == x) break;
                    }
                    cout << endl;
                    break;
                }
            }
            if (!flag) {
                int u = back[i][0], v = back[i][1];
                if (dep[u] < dep[v]) swap(u, v);
                println(dep[u] - dep[v] + 2);
                print(i);
                int x = u;
                while (true) {
                    print(x);
                    if (x == v) break;
                    x = fa[x];
                }
                cout << endl;
            }
        }

#ifdef LOCAL
//    cout << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt,len;
bool flag;
int a[maxl],vis[maxl],num[maxl],firm[maxl];
vector<int> e[maxl];
bool in[maxl];
vector<int> b[maxl];

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);
		e[v].push_back(u);
	}
}

inline void findmx(int k,int u)
{
	a[k]=u;in[u]=true;vis[u]=true;
	if(k==len)
	{
		flag=true;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		a[k]=0;in[u]=false;vis[u]=false;
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || in[v]) continue;
		findmx(k+1,v);
		if(flag)
			break;;
	}
	a[k]=0;in[u]=false;
}

inline void dfs(int k,int u,int st)
{
	vis[u]=true;a[k]=u;in[u]=true;vis[u]=st;
	for(int v:e[u])
	{
		if(k==4)
		{
			if(v==st)
			{
				flag=false;int id=0;
				for(int i=1;i<=4;i++)
				if(num[a[i]]==0)
					flag=true,id=i;
				if(!flag)
					return;
				firm[a[id]]=true;
				for(int i=id;i<=4;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				for(int i=1;i<id;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				a[k]=0;in[u]=false;vis[u]=false;
				return;
			}
			continue;
		}
		if(vis[v]==st || firm[v]) continue;
		if(k<4)
			dfs(k+1,v,st);
		if(flag) break;
	}
	a[k]=0;in[u]=false;
}

inline void mainwork()
{
	ans=0;
	if(n/k<=4)
	{
		flag=false;len=n/k;
		for(int i=1;i<=n;i++)
		if(!vis[i])
		{
			findmx(1,i);
			if(flag)
				break;
		}
		if(flag)
		{
			ans=1;
			return;
		}
	}
	else
	{
		memset(vis,0,sizeof(vis[0])*(n+1));
		cnt=0;
		for(int i=1;i<=n;i++)
		if(!firm[i])
		{
			cnt++;flag=false;
			dfs(1,i,i);
			if(!flag) cnt--;
			if(cnt==k)
				break;
		}
		if(cnt==k)
			ans=2;
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",len);
		for(int i=0;i<len;i++)
			printf("%d%c",b[1][i],(i==n-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");
		for(int i=1;i<=k;i++)
		{
			puts("4");
			for(int j=0;j<4;j++)
				printf("%d%c",b[i][j],(j==3)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt,len;
bool flag;
int a[maxl],vis[maxl],num[maxl],du[maxl];
vector<int> e[maxl];
bool in[maxl],firm[maxl];
vector<int> b[maxl];
struct node{
	int val,id;
}c[maxl];

inline bool cmp(const node &a,const node &b)
{
	return a.val<b.val;
}

inline bool cmp2(const int &a,const int &b)
{
	return du[a]>du[b];
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	for(int i=1;i<=n;i++)
		c[i]=node{du[i],i};
	sort(c+1,c+1+n,cmp);
	for(int i=1;i<=n;i++)
		sort(e[i].begin(),e[i].end(),cmp2);
}

inline void findmx(int k,int u)
{
	a[k]=u;in[u]=true;vis[u]=true;
	if(k==len)
	{
		flag=true;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		a[k]=0;in[u]=false;vis[u]=false;
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || in[v]) continue;
		findmx(k+1,v);
		if(flag)
			break;;
	}
	a[k]=0;in[u]=false;
}

inline void dfs(int k,int u,int st)
{
	vis[u]=true;a[k]=u;in[u]=true;vis[u]=st;
	for(int v:e[u])
	{
		if(k==4)
		{
			if(v==st)
			{
				flag=true;
				for(int i=1;i<=4;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				a[k]=0;in[u]=false;
				return;
			}
			continue;
		}
		if(vis[v]==st || firm[v]) continue;
		if(k<4)
			dfs(k+1,v,st);
		if(flag) break;
	}
	a[k]=0;in[u]=false;
}

inline void mainwork()
{
	ans=0;
	if(n/k<=4)
	{
		flag=false;len=n/k;
		for(int i=1;i<=n;i++)
		if(!vis[i])
		{
			findmx(1,i);
			if(flag)
				break;
		}
		if(flag)
		{
			ans=1;
			return;
		}
	}
	else
	{
		memset(vis,0,sizeof(vis[0])*(n+1));
		cnt=0;
		for(int i=1;i<=n;i++)
		if(!num[c[i].id])
		{
			cnt++;flag=false;
			dfs(1,c[i].id,c[i].id);
			if(!flag) cnt--;
			if(cnt==k)
				break;
		}
		if(cnt==k)
			ans=2;
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",len);
		for(int i=0;i<len;i++)
			printf("%d%c",b[1][i],(i==n-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");
		for(int i=1;i<=k;i++)
		{
			puts("4");
			for(int j=0;j<4;j++)
				printf("%d%c",b[i][j],(j==3)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt;
bool flag;
int a[maxl],du[maxl],dep[maxl],fa[maxl];
int plen[maxl],leaf[maxl];
vector<int> e[maxl];
bool in[maxl],vis[maxl];
vector<int> b[maxl],p[maxl];

inline void dfs(int len,int u)
{
	vis[u]=true;a[len]=u;bool son=false;
	if(len>=n/k)
	{
		ans=1;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || v==fa[u])continue;
		dep[v]=dep[u]+1;fa[v]=u;
		dfs(len+1,v);son=true;
		if(ans)
			return;
	}
	if(!son)
	{
		leaf[++tot]=u;plen[u]=len;
		for(int i=1;i<=len;i++)
			p[u].push_back(a[i]);
	}
	a[len]=0;
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	ans=0;dep[1]=1;fa[1]=0;
	dfs(1,1);
}

inline void mainwork()
{
	if(ans)
		return;
	if(tot<k)
		return;
	ans=2;
	for(int i=1;i<=k;i++)
	{
		b[i].push_back(leaf[i]);
		for(int v:e[leaf[i]])
		if(dep[leaf[i]]-dep[v]>=3)
		{
			for(int j=plen[leaf[i]]-2;j>=0;j--)
			{
				b[i].push_back(p[leaf[i]][j]);
				if(p[leaf[i]][j]==v)
					break;
			}
			break;
		}
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",n/k);
		for(int i=0;i<n/k;i++)
			printf("%d%c",b[1][i],(i==n-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");int l;
		for(int i=1;i<=k;i++)
		{
			l=b[i].size();
			printf("%d\n",l);
			for(int j=0;j<l;j++)
				printf("%d%c",b[i][j],(j==3)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt,len;
bool flag;
int a[maxl],vis[maxl],num[maxl],du[maxl];
vector<int> e[maxl];
bool in[maxl],firm[maxl];
vector<int> b[maxl];
struct node{
	int val,id;
}c[maxl];

inline bool cmp(const node &a,const node &b)
{
	return a.val<b.val;
}

inline bool cmp2(const int &a,const int &b)
{
	return du[a]>du[b];
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	for(int i=1;i<=n;i++)
		c[i]=node{du[i],i};
	sort(c+1,c+1+n,cmp);
	for(int i=1;i<=n;i++)
		sort(e[i].begin(),e[i].end(),cmp2);
}

inline void findmx(int k,int u)
{
	a[k]=u;in[u]=true;vis[u]=true;
	if(k==len)
	{
		flag=true;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		a[k]=0;in[u]=false;vis[u]=false;
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || in[v]) continue;
		findmx(k+1,v);
		if(flag)
			break;;
	}
	a[k]=0;in[u]=false;
}

inline void dfs(int k,int u,int st)
{
	vis[u]=true;a[k]=u;in[u]=true;vis[u]=st;
	for(int v:e[u])
	{
		if(k==4)
		{
			if(v==st)
			{
				flag=true;firm[a[1]]=true;
				for(int i=1;i<=4;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				a[k]=0;in[u]=false;
				return;
			}
			continue;
		}
		if(vis[v]==st || firm[v]) continue;
		if(k<4)
			dfs(k+1,v,st);
		if(flag) break;
	}
	a[k]=0;in[u]=false;
}

inline void mainwork()
{
	ans=0;
	if(n/k<=4)
	{
		flag=false;len=n/k;
		for(int i=1;i<=n;i++)
		if(!vis[i])
		{
			findmx(1,i);
			if(flag)
				break;
		}
		if(flag)
		{
			ans=1;
			return;
		}
	}
	else
	{
		memset(vis,0,sizeof(vis[0])*(n+1));
		cnt=0;
		for(int i=1;i<=n;i++)
		if(!num[c[i].id])
		{
			cnt++;flag=false;
			dfs(1,c[i].id,c[i].id);
			if(!flag) cnt--;
			if(cnt==k)
				break;
		}
		if(cnt==k)
			ans=2;
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",len);
		for(int i=0;i<len;i++)
			printf("%d%c",b[1][i],(i==n-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");
		for(int i=1;i<=k;i++)
		{
			puts("4");
			for(int j=0;j<4;j++)
				printf("%d%c",b[i][j],(j==3)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt,len;
bool flag;
int a[maxl],vis[maxl],num[maxl],firm[maxl];
vector<int> e[maxl];
bool in[maxl];
vector<int> b[maxl];

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);
		e[v].push_back(u);
	}
}

inline void findmx(int k,int u)
{
	a[k]=u;in[u]=true;vis[u]=true;
	if(k==len)
	{
		flag=true;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		a[k]=0;in[u]=false;vis[u]=false;
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || in[v]) continue;
		findmx(k+1,v);
		if(flag)
			break;;
	}
	a[k]=0;in[u]=false;
}

inline void dfs(int k,int u,int st)
{
	vis[u]=true;a[k]=u;in[u]=true;vis[u]=st;
	for(int v:e[u])
	{
		if(k==4)
		{
			if(v==st)
			{
				flag=false;int id=0;
				for(int i=1;i<=4;i++)
				if(num[a[i]]==0)
					flag=true,id=i;
				if(!flag)
					return;
				firm[a[id]]=true;
				for(int i=id;i<=4;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				for(int i=1;i<id;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				a[k]=0;in[u]=false;vis[u]=false;
				return;
			}
			continue;
		}
		if(vis[v]==st || firm[v]) continue;
		if(k<4)
			dfs(k+1,v,st);
		if(flag) break;
	}
	a[k]=0;in[u]=false;
}

inline void mainwork()
{
	ans=0;
	if(n/k<=4)
	{
		flag=false;len=n/k;
		for(int i=1;i<=n;i++)
		if(!vis[i])
		{
			findmx(1,i);
			if(flag)
				break;
		}
		if(flag)
		{
			ans=1;
			return;
		}
	}
	else
	{
		memset(vis,0,sizeof(vis[0])*(n+1));
		cnt=0;
		for(int i=1;i<=n;i++)
		{
			cnt++;flag=false;
			dfs(1,i,i);
			if(!flag) cnt--;
			if(cnt==k)
				break;
		}
		if(cnt==k)
			ans=2;
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",len);
		for(int i=0;i<len;i++)
			printf("%d%c",b[1][i],(i==n-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");
		for(int i=1;i<=k;i++)
		{
			puts("4");
			for(int j=0;j<4;j++)
				printf("%d%c",b[i][j],(j==3)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt;
bool flag;
int a[maxl],du[maxl],dep[maxl],fa[maxl],leaf[maxl];
vector<int> e[maxl];
bool vis[maxl];
vector<int> b[maxl];

inline void dfs(int len,int u)
{
	vis[u]=true;a[len]=u;bool son=false;
	if(len>=n/k)
	{
		ans=1;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || v==fa[u])continue;
		dep[v]=dep[u]+1;fa[v]=u;son=true;
		dfs(len+1,v);
		if(ans)
			return;
	}
	if(!son)
		leaf[++tot]=u;
	a[len]=0;
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	ans=0;dep[1]=1;fa[1]=0;
	dfs(1,1);
}

inline void mainwork()
{
	if(ans)
		return;
	ans=2;
	for(int i=1;i<=k;i++)
		for(int v:e[leaf[i]])
		if(dep[leaf[i]]-dep[v]>=3)
		{
			int u=leaf[i];
			while(u!=v)
			{
				b[i].push_back(u);
				u=fa[u];
			}
			b[i].push_back(v);
			break;
		}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",n/k);
		for(int i=0;i<n/k;i++)
			printf("%d%c",b[1][i],(i==n/k-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");int l;
		for(int i=1;i<=k;i++)
		{
			l=b[i].size();
			printf("%d\n",l);
			for(int j=0;j<l;j++)
				printf("%d%c",b[i][j],(j==l-1)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt,up;
bool flag;
int a[maxl],du[maxl],dep[maxl],fa[maxl],leaf[maxl];
vector<int> e[maxl];
bool vis[maxl];
vector<int> b[maxl];

inline void dfs(int len,int u)
{
	vis[u]=true;a[len]=u;bool son=false;
	if(len==up)
	{
		ans=1;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || v==fa[u])continue;
		dep[v]=dep[u]+1;fa[v]=u;son=true;
		dfs(len+1,v);
		if(ans)
			return;
	}
	if(!son)
		leaf[++tot]=u;
	a[len]=0;
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;up=n/k+(n%k!=0);
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	ans=0;dep[1]=1;fa[1]=0;
	dfs(1,1);
}

inline void mainwork()
{
	if(ans)
		return;
	ans=2;int d1,d2,u,d;
	for(int i=1;i<=k;i++)
	{
		d1=0;d2=0;u=leaf[i];
		for(int v:e[u])
		if(v!=fa[u])
		{
			if(!d1) d1=v;
			else{d2=v;break;}
		}
		if(dep[d1]<dep[d2])
			swap(d1,d2);
		if(dep[u]-dep[d1]+1>=3 && (dep[u]-dep[d1]+1)%3!=0)
		{
			d=u;
			while(d!=d1)
			{
				b[i].push_back(d);
				d=fa[d];
			}
			b[i].push_back(d1);
		}
		else if(dep[u]-dep[d2]+1>=3 && (dep[u]-dep[d2]+1)%3!=0)
		{
			d=u;
			while(d!=d2)
			{
				b[i].push_back(d);
				d=fa[d];
			}
			b[i].push_back(d2);
		}
		else
		{
			b[i].push_back(u);d=d1;
			while(d!=d2)
			{
				b[i].push_back(d);
				d=fa[d];
			}
			b[i].push_back(d2);
		}
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",up);
		for(int i=0;i<up;i++)
			printf("%d%c",b[1][i],(i==up-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");int l;
		for(int i=1;i<=k;i++)
		{
			l=b[i].size();
			printf("%d\n",l);
			for(int j=0;j<l;j++)
				printf("%d%c",b[i][j],(j==l-1)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt;
bool flag;
int a[maxl],du[maxl],dep[maxl],fa[maxl],leaf[maxl];
vector<int> e[maxl];
bool vis[maxl];
vector<int> b[maxl];

inline void dfs(int len,int u)
{
	vis[u]=true;a[len]=u;bool son=false;
	if(len>=n/k)
	{
		ans=1;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || v==fa[u])continue;
		dep[v]=dep[u]+1;fa[v]=u;son=true;
		dfs(len+1,v);
		if(ans)
			return;
	}
	if(!son)
		leaf[++tot]=u;
	a[len]=0;
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	ans=0;dep[1]=1;fa[1]=0;
	dfs(1,1);
}

inline void mainwork()
{
	if(ans)
		return;
	ans=2;int d1,d2,u,d;
	for(int i=1;i<=k;i++)
	{
		d1=0;d2=0;u=leaf[i];
		for(int v:e[u])
		if(v!=fa[u])
		{
			if(!d1) d1=v;
			else{d2=v;break;}
		}
		if(dep[d1]<dep[d2])
			swap(d1,d2);
		if(dep[u]-dep[d1]+1>=3 && (dep[u]-dep[d1]+1)%3!=0)
		{
			d=u;
			while(d!=d1)
			{
				b[i].push_back(d);
				d=fa[d];
			}
			b[i].push_back(d1);
		}
		else if(dep[u]-dep[d2]+1>=3 && (dep[u]-dep[d2]+1)%3!=0)
		{
			d=u;
			while(d!=d2)
			{
				b[i].push_back(d);
				d=fa[d];
			}
			b[i].push_back(d2);
		}
		else
		{
			b[i].push_back(u);d=d1;
			while(d!=d2)
			{
				b[i].push_back(d);
				d=fa[d];
			}
			b[i].push_back(d2);
		}
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",n/k);
		for(int i=0;i<n/k;i++)
			printf("%d%c",b[1][i],(i==n/k-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");int l;
		for(int i=1;i<=k;i++)
		{
			l=b[i].size();
			printf("%d\n",l);
			for(int j=0;j<l;j++)
				printf("%d%c",b[i][j],(j==l-1)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt,len;
bool flag;
int a[maxl],vis[maxl],num[maxl],du[maxl];
vector<int> e[maxl];
bool in[maxl],firm[maxl];
vector<int> b[maxl];
struct node{
	int val,id;
}c[maxl];

inline bool cmp(const node &a,const node &b)
{
	return a.val<b.val;
}

inline bool cmp2(const int &a,const int &b)
{
	return du[a]<du[b];
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	for(int i=1;i<=n;i++)
		c[i]=node{du[i],i};
	sort(c+1,c+1+n,cmp);
	for(int i=1;i<=n;i++)
		sort(e[i].begin(),e[i].end(),cmp2);
}

inline void findmx(int k,int u)
{
	a[k]=u;in[u]=true;vis[u]=true;
	if(k==len)
	{
		flag=true;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		a[k]=0;in[u]=false;vis[u]=false;
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || in[v]) continue;
		findmx(k+1,v);
		if(flag)
			break;;
	}
	a[k]=0;in[u]=false;
}

inline void dfs(int k,int u,int st)
{
	vis[u]=true;a[k]=u;in[u]=true;vis[u]=st;
	for(int v:e[u])
	{
		if(k==4)
		{
			if(v==st)
			{
				flag=true;firm[a[1]]=true;
				for(int i=1;i<=4;i++)
					b[cnt].push_back(a[i]),num[a[i]]++;
				a[k]=0;in[u]=false;
				return;
			}
			continue;
		}
		if(vis[v]==st || firm[v]) continue;
		if(k<4)
			dfs(k+1,v,st);
		if(flag) break;
	}
	a[k]=0;in[u]=false;
}

inline void mainwork()
{
	ans=0;
	if(n/k<=4)
	{
		flag=false;len=n/k;
		for(int i=1;i<=n;i++)
		if(!vis[i])
		{
			findmx(1,i);
			if(flag)
				break;
		}
		if(flag)
		{
			ans=1;
			return;
		}
	}
	else
	{
		memset(vis,0,sizeof(vis[0])*(n+1));
		cnt=0;
		for(int i=1;i<=n;i++)
		if(!num[c[i].id])
		{
			cnt++;flag=false;
			dfs(1,c[i].id,c[i].id);
			if(!flag) cnt--;
			if(cnt==k)
				break;
		}
		if(cnt==k)
			ans=2;
	}
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",len);
		for(int i=0;i<len;i++)
			printf("%d%c",b[1][i],(i==n-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");
		for(int i=1;i<=k;i++)
		{
			puts("4");
			for(int j=0;j<4;j++)
				printf("%d%c",b[i][j],(j==3)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int maxl=5e5+10;

int n,m,ans,cas,k,tot,cnt;
bool flag;
int a[maxl],du[maxl],dep[maxl],fa[maxl],num[maxl];
vector<int> e[maxl],leaf,tmp;
bool vis[maxl];
vector<int> b[maxl];

inline void dfs(int len,int u)
{
	vis[u]=true;a[len]=u;bool son=false;
	if(len>=n/k)
	{
		ans=1;
		for(int i=1;i<=len;i++)
			b[1].push_back(a[i]);
		return;
	}
	for(int v:e[u])
	{
		if(vis[v] || v==fa[u])continue;
		dep[v]=dep[u]+1;fa[v]=u;son=true;
		dfs(len+1,v);
		if(ans)
			return;
	}
	if(!son)
		leaf.push_back(u);
	a[len]=0;
}

inline void prework()
{
	scanf("%d%d%d",&n,&m,&k);
	int u,v;
	for(int i=1;i<=m;i++)
	{
		scanf("%d%d",&u,&v);
		e[u].push_back(v);du[u]++;
		e[v].push_back(u);du[v]++;
	}
	ans=0;dep[1]=1;fa[1]=0;
	dfs(1,1);
}

inline void mainwork()
{
	if(ans)
		return;
	while(cnt<k)
	{
		tot=leaf.size();
		if(tot==0)
			break;
		for(int i=0;i<tot && cnt<k;i++)
		if(num[leaf[i]]==0)
			for(int v:e[leaf[i]])
			if(dep[leaf[i]]-dep[v]+1>=3 && (dep[leaf[i]]-dep[v]+1)%3!=0)
			{
				int u=leaf[i];++cnt;
				while(u!=v)
				{
					num[u]++;
					b[cnt].push_back(u);
					u=fa[u];
				}
				b[cnt].push_back(v);num[v]++;
				break;
			}
		tmp.clear();
		for(int d:leaf)
		if(fa[d]>0)
			tmp.push_back(fa[d]);
		sort(tmp.begin(),tmp.end());
		tmp.erase(unique(tmp.begin(),tmp.end()),tmp.end());
		leaf.clear();
		for(int d:tmp)
			leaf.push_back(d);

	}
	if(cnt>=k)
		ans=2;
	else
		ans=0;
}

inline void print()
{
	if(!ans)
		puts("-1");
	else if(ans==1)
	{
		puts("PATH");
		printf("%d\n",n/k);
		for(int i=0;i<n/k;i++)
			printf("%d%c",b[1][i],(i==n/k-1)?'\n':' ');
	}
	else
	{
		puts("CYCLES");int l;
		for(int i=1;i<=k;i++)
		{
			l=b[i].size();
			printf("%d\n",l);
			for(int j=0;j<l;j++)
				printf("%d%c",b[i][j],(j==l-1)?'\n':' ');
		}
	}
}

int main()
{
	int t=1;
	//scanf("%d",&t);
	for(cas=1;cas<=t;cas++)
	{
		prework();
		mainwork();
		print();
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define MAXN 300000
int n,m,k,a,b;
vector<int> v[MAXN+5],path,leaf,temp;
vector<int> cycle[MAXN+5];
bool isPath;
int visited[MAXN+5],curCycle;

void dfs(int now, int last, int depth){
    if(visited[now])return;
    visited[now] = depth;
    temp.push_back(now);
    if(depth > n/k){
        isPath = true;
        path = temp;
        temp.pop_back();
        return;
    }
    bool isLeaves = true;
    for(int i = 0; i < v[now].size(); i++){
        int tg = v[now][i];
        if(tg==last)continue;
        if(!visited[tg]){
            dfs(tg,now,depth+1);
            isLeaves = false;
        }
    }
    if(isLeaves){
        vector<int> ancestor;
        bool findCycle = false;
        for(int i = 0; i < v[now].size(); i++){
            int tg = v[now][i];
            if(tg==last)continue;
            if((depth-visited[tg])%3 != 2){
                findCycle = true;
                for(int i = depth-1; i >= visited[tg]-1; i--){
                    cycle[curCycle].push_back(temp[i]);
                }
                break;
            } else {
                ancestor.push_back(visited[tg]);
            }
        }
        if(!findCycle){
            cycle[curCycle].push_back(now);
            sort(ancestor.begin(),ancestor.end());
            for(int i = ancestor[0]-1; i < ancestor[1]; i++){
                cycle[curCycle].push_back(temp[i]);
            }
        }
        curCycle++;
    }
    temp.pop_back();
}

int main(){
    scanf("%d %d %d", &n, &m, &k);
    for(int i = 0; i < m; i++){
        scanf("%d %d", &a, &b);
        a--;
        b--;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    dfs(0,0,1);
    if(isPath){
        printf("PATH\n");
        printf("%d\n", path.size());
        for(int i = 0; i < path.size(); i++){
            printf("%d", path[i]+1);
            if(i==path.size()-1)printf("\n");
            else printf(" ");
        }
    } else {
        printf("CYCLES\n");
        for(int i = 0; i < k; i++){
            printf("%d\n", cycle[i].size());
            for(int j = 0; j < cycle[i].size(); j++){
                printf("%d", cycle[i][j]+1);
                if(j==cycle[i].size()-1)printf("\n");
                else printf(" ");
            }
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
#define MAXN 300000
int n,m,k,a,b;
vector<int> v[MAXN+5],path,leaf,temp;
vector<int> cycle[MAXN+5];
bool isPath;
int visited[MAXN+5],curCycle;

void dfs(int now, int last, int depth){
    if(visited[now])return;
    visited[now] = depth;
    temp.push_back(now);
    if(depth > n/k){
        isPath = true;
        path = temp;
        temp.pop_back(now);
        return;
    }
    bool isLeaves = true;
    for(int i = 0; i < v[now].size(); i++){
        int tg = v[now][i];
        if(tg==last)continue;
        if(!visited[tg]){
            dfs(tg,now,depth+1);
            isLeaves = false;
        }
    }
    if(isLeaves){
        vector<int> ancestor;
        bool findCycle = false;
        for(int i = 0; i < v[now].size(); i++){
            int tg = v[now][i];
            if(tg==last)continue;
            if((depth-visited[tg])%3 != 2){
                findCycle = true;
                for(int i = depth-1; i >= visited[tg]-1; i--){
                    cycle[curCycle].push_back(temp[i]);
                }
                break;
            } else {
                ancestor.push_back(visited[tg]);
            }
        }
        if(!findCycle){
            cycle[curCycle].push_back(now);
            sort(ancestor.begin(),ancestor.end());
            for(int i = ancestor[0]-1; i < ancestor[1]; i++){
                cycle[curCycle].push_back(temp[i]);
            }
        }
        curCycle++;
    }
    temp.pop_back();
}

int main(){
    scanf("%d %d %d", &n, &m, &k);
    for(int i = 0; i < m; i++){
        scanf("%d %d", &a, &b);
        a--;
        b--;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    dfs(0,0,1);
    if(isPath){
        printf("PATH\n");
        printf("%d\n", path.size());
        for(int i = 0; i < path.size(); i++){
            printf("%d", path[i]+1);
            if(i==path.size()-1)printf("\n");
            else printf(" ");
        }
    } else {
        printf("CYCLES\n");
        for(int i = 0; i < k; i++){
            printf("%d\n", cycle[i].size());
            for(int j = 0; j < cycle[i].size(); j++){
                printf("%d", cycle[i][j]+1);
                if(j==cycle[i].size()-1)printf("\n");
                else printf(" ");
            }
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
#define MAXN 300000
int n,m,k,a,b;
vector<int> v[MAXN+5],path,leaf,temp;
vector<int> cycle[MAXN+5];
bool isPath;
int visited[MAXN+5],curCycle;

void dfs(int now, int last, int depth){
    if(visited[now])return;
    visited[now] = depth;
    temp.push_back(now);
    if(depth > n/k){
        isPath = true;
        path = temp;
        return;
    }
    bool isLeaves = true;
    for(int i = 0; i < v[now].size(); i++){
        int tg = v[now][i];
        if(tg==last)continue;
        if(!visited[tg]){
            dfs(tg,now,depth+1);
            isLeaves = false;
        }
    }
    if(isLeaves){
        vector<int> ancestor;
        bool findCycle = false;
        for(int i = 0; i < v[now].size(); i++){
            int tg = v[now][i];
            if(tg==last)continue;
            if((depth-visited[tg])%3 != 2){
                findCycle = true;
                for(int i = depth-1; i >= visited[tg]-1; i--){
                    cycle[curCycle].push_back(temp[i]);
                }
                break;
            } else {
                ancestor.push_back(visited[tg]);
            }
        }
        if(!findCycle){
            cycle[curCycle].push_back(now);
            sort(ancestor.begin(),ancestor.end());
            for(int i = ancestor[0]-1; i < ancestor[1]; i++){
                cycle[curCycle].push_back(temp[i]);
            }
        }
        curCycle++;
    }
    temp.pop_back();
}

int main(){
    scanf("%d %d %d", &n, &m, &k);
    for(int i = 0; i < m; i++){
        scanf("%d %d", &a, &b);
        a--;
        b--;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    dfs(0,0,1);
    if(isPath){
        printf("PATH\n");
        printf("%d\n", path.size());
        for(int i = 0; i < path.size(); i++){
            printf("%d", path[i]+1);
            if(i==path.size()-1)printf("\n");
            else printf(" ");
        }
    } else {
        printf("CYCLES\n");
        for(int i = 0; i < k; i++){
            printf("%d\n", cycle[i].size());
            for(int j = 0; j < cycle[i].size(); j++){
                printf("%d", cycle[i][j]+1);
                if(j==cycle[i].size()-1)printf("\n");
                else printf(" ");
            }
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
const int N = 250010;

int dep[N],fa[N],n,m,k,x,y,maxdep=0,maxu;
bool leaf[N],v[N];
vector<int> g[N];

void dfs(int u){
	maxdep=dep[u]>maxdep?dep[maxu=u]:maxdep;
	v[u] = leaf[u] = true;
	for(auto x:g[u])if(!v[x]){
		leaf[u] = false;
		dep[x] = dep[u] + 1;
		fa[x] = u;
		dfs(x);
	}
}

int main(){
	scanf("%d%d%d",&n,&m,&k);
	rep(i,1,m){
		scanf("%d%d",&x,&y);
		g[x].push_back(y);
		g[y].push_back(x);
	}
	dep[1]=1;dfs(1);
	if(maxdep>n/k)
		for(printf("PATH\n%d\n",maxdep);maxu;maxu=fa[maxu])printf("%d ",maxu);
	else{
		printf("CYCLES");
		for(int u=1;k;++u)if(leaf[u]){
			--k;
			vector<int> a;
			for(auto x:g[u])if(x!=fa[u])a.push_back(x);
			if(dep[a[0]]>dep[a[1]])swap(a[0],a[1]);
			int d1=dep[a[0]],d2=dep[a[1]],d3=dep[u];
			if((d3-d1+1)%3)
				for(printf("\n%d\n",d3-d1+1),x=u;x!=fa[a[0]];x=fa[x])printf("%d ",x);
			else if((d3-d2+1)%3)
				for(printf("\n%d\n",d3-d2+1),x=u;x!=fa[a[1]];x=fa[x])printf("%d ",x);
			else
				for(printf("\n%d\n%d ",d2-d1+2,u),x=a[1];x!=fa[a[0]];x=fa[x])printf("%d ",x);
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
typedef long long LL;
const int N = 250010;

int dep[N],fa[N],n,m,k,x,y,maxdep=0,maxu;
bool leaf[N],v[N];
vector<int> g[N];

void dfs(int u){
	maxdep=dep[u]>maxdep?dep[maxu=u]:maxdep;
	v[u] = leaf[u] = true;
	for(auto x:g[u])if(!v[x]){
		leaf[u] = false;
		dep[x] = dep[u] + 1;
		fa[x] = u;
		dfs(x);
	}
}

int main(){
	scanf("%d%d%d",&n,&m,&k);
	rep(i,1,m){
		scanf("%d%d",&x,&y);
		g[x].push_back(y);
		g[y].push_back(x);
	}
	dep[1]=1;dfs(1);
	if(maxdep>n/k)
		for(printf("PATH\n%d\n",maxdep);maxu;maxu=fa[maxu])printf("%d ",maxu);
	else{
		printf("CYCLES");
		for(int u=1;k;++u)if(leaf[u]){
			--k;
			vector<int> a;
			for(auto x:g[u])if(x!=fa[u])a.push_back(x);
			if(dep[a[0]]>dep[a[1]])swap(a[0],a[1]);
			int d1=dep[a[0]],d2=dep[a[1]],d3=maxdep;
			if((d3-d1+1)%3)
				for(printf("\n%d\n",d3-d1+1),x=u;x!=fa[a[0]];x=fa[x])printf("%d ",x);
			else if((d3-d2+1)%3)
				for(printf("\n%d\n",d3-d2+1),x=u;x!=fa[a[1]];x=fa[x])printf("%d ",x);
			else
				for(printf("\n%d\n%d ",d2-d1+2,u),x=a[1];x!=fa[a[0]];x=fa[x])printf("%d ",x);
		}
	}
	return 0;
}


#include <string.h>
#include <unordered_map>

#include <sstream>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <bitset>
#include <algorithm>
#include <iostream>
#include   <stdlib.h>
#include   <time.h>
#include <stack>
#include <queue>
#include <set>

#include <map>
#include <vector>
#include <string>
#include <stdlib.h>

#define ll long long
#define clr(x) memset(x,0,sizeof(x))
#define _clr(x) memset(x,-1,sizeof(x))
#define fr(i,a,b) for(int i = a; i < b; ++i)
#define frr(i,a,b) for(int i = a; i > b; --i)
#define pb push_back
#define sf scanf

#define pf printf
#define mp make_pair

using namespace std;
ll mod = 1000000007;
int n,m,k;
string s;

vector<int> g[1000010];
vector<int> ans,path;
int cnt;
int v[1000010], dep[1000010];

int find_path(int t) {

	v[t] = 1;
	ans.pb(t);
	if(ans.size()==cnt) {
		return 1;
	}
	for(int i : g[t]) {
		if(v[i])continue;
		if(find_path(i)) {
			return 1;
		}
	}
	ans.pop_back();
	return 0;
}

void dfs(int t, int f) {

	//printf("dfs t = %d f = %d\n",t,f);
	v[t] = 1;
	dep[t] = path.size();
	path.pb(t);

	int ok = 1;
	for(int i : g[t]) {
		if(i==f)continue;
		if(!v[i]) {
			dfs(i,t);
			ok = 0;
		}
	}
	if(ok&&cnt) {
		//leaf
		int x= -1, y = -1;
		for(int i : g[t]) {
			if(i==f)continue;
			if(x==-1)x=i;
			else {
				y = i;
				break;
			}
		}

		int l = -1, r = -1;
		if((dep[t]-dep[x]+1)%3!= 0) {
			l = t; r = x;
		}
		else if((dep[t]-dep[y]+1)%3!=0) {
			l = t; r = y;
		}
		else {
			l = x; r = y;
		}

		if(dep[l]>dep[r])swap(l,r);
		//printf("find l = %d r = %d\n",l,r);
		printf("%d\n",dep[r]-dep[l]+1);
		for(int i = dep[l]; i <=dep[r]; ++i) {
			printf("%d ",path[i]);
		}
		printf("\n");
		cnt--;
	}
	path.pop_back();
	//printf("pop t = %d\n",t);
}

void find_circle() {
	clr(v);
	dfs(1,1);
}

int main(){
	cin>>n>>m>>k;
	fr(i,0,m) {
		int u,v;
		sf("%d%d",&u,&v);
		g[u].pb(v);
		g[v].pb(u);
	}

	cnt = (n+k-1)/k;
	clr(v);
	if(find_path(1)) {
		printf("PATH\n");
		printf("%d\n",ans.size());
		for(int i = 0; i < ans.size();++i) {
			printf("%d ",ans[i]);
		}
		printf("\n");
	}
	else {
		cnt = k;
		printf("CYCLES\n");
		find_circle();
	}
}


#include <string.h>
#include <unordered_map>

#include <sstream>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <bitset>
#include <algorithm>
#include <iostream>
#include   <stdlib.h>
#include   <time.h>
#include <stack>
#include <queue>
#include <set>

#include <map>
#include <vector>
#include <string>
#include <stdlib.h>

#define ll long long
#define clr(x) memset(x,0,sizeof(x))
#define _clr(x) memset(x,-1,sizeof(x))
#define fr(i,a,b) for(int i = a; i < b; ++i)
#define frr(i,a,b) for(int i = a; i > b; --i)
#define pb push_back
#define sf scanf

#define pf printf
#define mp make_pair

using namespace std;
ll mod = 1000000007;
int n,m,k;
string s;

vector<int> g[1000010];
vector<int> ans,path;
int cnt;
int v[1000010], dep[1000010];

int find_path(int t) {

	v[t] = 1;
	ans.pb(t);
	if(ans.size()==cnt) {
		return 1;
	}
	for(int i : g[t]) {
		if(v[i])continue;
		if(find_path(i)) {
			return 1;
		}
	}
	ans.pop_back();
	return 0;
}

void dfs(int t, int f) {

	//printf("dfs t = %d f = %d\n",t,f);
	v[t] = 1;
	dep[t] = path.size();
	path.pb(t);

	int ok = 1;
	for(int i : g[t]) {
		if(i==f)continue;
		if(!v[i]) {
			dfs(i,t);
			ok = 0;
		}
	}
	if(ok&&cnt) {
		//leaf
		int x= -1, y = -1;
		for(int i : g[t]) {
			if(i==f)continue;
			if(x==-1)x=i;
			else {
				y = i;
				break;
			}
		}

		int l = -1, r = -1;
		if((dep[t]-dep[x]+1)%3!= 0) {
			l = t; r = x;
		}
		else if((dep[t]-dep[y]+1)%3!=0) {
			l = t; r = y;
		}
		else {
			l = x; r = y;
		}

		if(dep[l]>dep[r])swap(l,r);
		if(r!=t) {
			printf("%d\n",dep[r]-dep[l]+2);
			printf("%d ",t);
		}
		else {
			printf("%d\n",dep[r]-dep[l]+1);
		}
		//printf("find l = %d r = %d\n",l,r);
		for(int i = dep[r]; i >=dep[l]; --i) {
			printf("%d ",path[i]);
		}
		printf("\n");
		cnt--;
	}
	path.pop_back();
	//printf("pop t = %d\n",t);
}

void find_circle() {
	clr(v);
	dfs(1,1);
}

int main(){
	cin>>n>>m>>k;
	fr(i,0,m) {
		int u,v;
		sf("%d%d",&u,&v);
		g[u].pb(v);
		g[v].pb(u);
	}

	cnt = (n+k-1)/k;
	clr(v);
	if(find_path(1)) {
		printf("PATH\n");
		printf("%d\n",ans.size());
		for(int i = 0; i < ans.size();++i) {
			printf("%d ",ans[i]);
		}
		printf("\n");
	}
	else {
		cnt = k;
		printf("CYCLES\n");
		find_circle();
	}
}


#include <bits/stdc++.h>
using namespace std;

#define N 300010
int n, m ,k;
vector <int> G[N];

int fa[N], vis[N], deep[N], Max, pos;
void DFS(int u)
{
	vis[u] = 1;
	if (deep[u] > Max)
	{
		Max = deep[u];
		pos = u;
	}
	for (auto v : G[u]) if (!vis[v] && v != fa[u])
	{
		fa[v] = u;
		deep[v] = deep[u] + 1;
		DFS(v);
	}
}

vector < vector <int> > res;
bool used[N];
bool ok(vector <int> v)
{
	for (auto it : v) if (!used[it])
		return true;
	return false;
}
void work(int u)
{
	vis[u] = 1;
	for (auto v : G[u]) if (v != fa[u])
	{
		if (vis[v])
		{
			int uu = u, vv = v;
			if (deep[uu] < deep[vv]) swap(uu, vv);
			if ((deep[uu] - deep[vv] + 1) % 3 && res.size() < k)
			{
				vector <int> tmp;
				int it = uu;
				while (it != fa[vv])
				{
					tmp.push_back(it);
					it = fa[it];
				}
				if (ok(tmp))
				{
					for (auto it : tmp) used[it] = 1;
					res.push_back(tmp);
				}
			}
			continue;
		}
		else if (!vis[v])
			work(v);
	}
}

int main()
{
	while (scanf("%d%d%d", &n, &m, &k) != EOF)
	{
		for (int i = 1; i <= n; ++i) G[i].clear();
		for (int i = 1, u, v; i <= m; ++i)
		{
			scanf("%d%d", &u, &v);
			G[u].push_back(v);
			G[v].push_back(u);
		}
		deep[1] = 1; Max = 1;
		fa[1] = 0;
		DFS(1);
		if (Max > n / k)
		{
			puts("PATH");
			vector <int> res;
			int it = pos;
			while (it)
			{
				res.push_back(it);
				it = fa[it];
			}
			int len = res.size();
			printf("%d\n", len);
			for (int i = 0; i < len; ++i) printf("%d%c", res[i], " \n"[i == len - 1]);
		}
		else
		{
			puts("CYCLES");
			memset(vis, 0, sizeof vis);
			memset(used, 0, sizeof used);
			work(1);
			for (int i = 0; i < k; ++i)
			{
				auto it = res[i];
				int len = it.size();
				printf("%d\n", len);
				for (int j = 0; j < len; ++j) printf("%d%c", it[j], " \n"[j == len - 1]);
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define N 300010
int n, m ,k;
vector <int> G[N];

int fa[N], vis[N], deep[N], Max, pos;
void DFS(int u)
{
	vis[u] = 1;
	if (deep[u] > Max)
	{
		Max = deep[u];
		pos = u;
	}
	for (auto v : G[u]) if (!vis[v] && v != fa[u])
	{
		fa[v] = u;
		deep[v] = deep[u] + 1;
		DFS(v);
	}
}

vector < vector <int> > res;
void work(int u)
{
	vis[u] = 1;
	for (auto v : G[u]) if (v != fa[u])
	{
		if (vis[v] && deep[v] < deep[u])
		{
			if ((deep[u] - deep[v] + 1) % 3 && res.size() < k)
			{
				vector <int> tmp;
				int it = u;
				while (it != fa[v])
				{
					tmp.push_back(it);
					it = fa[it];
				}
				res.push_back(tmp);
			}
			continue;
		}
		else if (!vis[v])
			work(v);
	}
}

int main()
{
	while (scanf("%d%d%d", &n, &m, &k) != EOF)
	{
		for (int i = 1; i <= n; ++i) G[i].clear();
		for (int i = 1, u, v; i <= m; ++i)
		{
			scanf("%d%d", &u, &v);
			G[u].push_back(v);
			G[v].push_back(u);
		}
		deep[1] = 1; Max = 1;
		fa[1] = 0;
		DFS(1);
		if (Max > n / k)
		{
			puts("PATH");
			vector <int> res;
			int it = pos;
			while (it)
			{
				res.push_back(it);
				it = fa[it];
			}
			int len = res.size();
			printf("%d\n", len);
			for (int i = 0; i < len; ++i) printf("%d%c", res[i], " \n"[i == len - 1]);
		}
		else
		{
			puts("CYCLES");
			memset(vis, 0, sizeof vis);
			work(1);
			for (int i = 0; i < k; ++i)
			{
				auto it = res[i];
				int len = it.size();
				printf("%d\n", len);
				for (int j = 0; j < len; ++j) printf("%d%c", it[j], " \n"[j == len - 1]);
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define N 300010
int n, m ,k;
vector <int> G[N];

int fa[N], vis[N], deep[N], Max, pos;
void DFS(int u)
{
	vis[u] = 1;
	if (deep[u] > Max)
	{
		Max = deep[u];
		pos = u;
	}
	for (auto v : G[u]) if (!vis[v])
	{
		fa[v] = u;
		deep[v] = deep[u] + 1;
		DFS(v);
	}
}

vector < vector <int> > res;
int isleaf[N];
void work(int u)
{
	vis[u] = 1;
	if (!isleaf[u])
	{
		if (res.size() >= k) return;
		int x = -1, y = -1;
		for (auto v : G[u]) if (v != fa[u])
		{
			if (x == -1) x = v;
			else if (y == -1) y = v;
			else break;
		}
		if (deep[x] > deep[y]) swap(x, y);
		vector <int> tmp; int it = -1, top = -1;
		if ((deep[u] - deep[y] + 1) % 3 && (deep[u] - deep[y] + 1) > 3)
		{
			it = u; top = fa[y];
		}
		else if ((deep[u] - deep[x] + 1) % 3 && (deep[u] - deep[x] + 1) > 3)
		{
			it = u; top = fa[x];
		}
		else if ((deep[y] - deep[x] + 2) % 3 && (deep[y] - deep[x] + 2) > 3)
		{
			tmp.push_back(u);
			it = y; top = fa[x];
		}
		if (it != -1)
		{
			while (it != top) tmp.push_back(it), it = fa[it];
			res.push_back(tmp);
		}
	}
	else for (auto v : G[u]) if (!vis[v]) work(v);
}

int main()
{
	while (scanf("%d%d%d", &n, &m, &k) != EOF)
	{
		for (int i = 1; i <= n; ++i) G[i].clear();
		for (int i = 1, u, v; i <= m; ++i)
		{
			scanf("%d%d", &u, &v);
			G[u].push_back(v);
			G[v].push_back(u);
		}
		deep[1] = 1; Max = 1;
		fa[1] = 0;
		DFS(1);
		if (Max > n / k)
		{
			puts("PATH");
			vector <int> res;
			int it = pos;
			while (it)
			{
				res.push_back(it);
				it = fa[it];
			}
			int len = res.size();
			printf("%d\n", len);
			for (int i = 0; i < len; ++i) printf("%d%c", res[i], " \n"[i == len - 1]);
		}
		else
		{
			puts("CYCLES");
			memset(vis, 0, sizeof vis);
			memset(isleaf, 0, sizeof isleaf);
			for (int i = 1; i <= n; ++i) isleaf[fa[i]] = 1;
			work(1);
			for (int i = 0; i < k; ++i)
			{
				auto it = res[i];
				int len = it.size();
				printf("%d\n", len);
				for (int j = 0; j < len; ++j) printf("%d%c", it[j], " \n"[j == len - 1]);
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define N 300010
int n, m ,k;
vector <int> G[N];

int fa[N], vis[N], deep[N], Max, pos;
void DFS(int u)
{
	vis[u] = 1;
	if (deep[u] > Max)
	{
		Max = deep[u];
		pos = u;
	}
	for (auto v : G[u]) if (!vis[v] && v != fa[u])
	{
		fa[v] = u;
		deep[v] = deep[u] + 1;
		DFS(v);
	}
}

vector < vector <int> > res;
bool used[N];
bool ok(vector <int> v)
{
	for (auto it : v) if (!used[it])
		return true;
	return false;
}
void work(int u)
{
	vis[u] = 1;
	for (auto v : G[u]) if (v != fa[u])
	{
		if (vis[v] && deep[v] < deep[u])
		{
			if ((deep[u] - deep[v] + 1) % 3 && res.size() < k)
			{
				vector <int> tmp;
				int it = u;
				while (it != fa[v])
				{
					tmp.push_back(it);
					it = fa[it];
				}
				if (ok(tmp))
				{
					for (auto it : tmp) used[it] = 1;
					res.push_back(tmp);
				}
			}
			continue;
		}
		else if (!vis[v])
			work(v);
	}
}

int main()
{
	while (scanf("%d%d%d", &n, &m, &k) != EOF)
	{
		for (int i = 1; i <= n; ++i) G[i].clear();
		for (int i = 1, u, v; i <= m; ++i)
		{
			scanf("%d%d", &u, &v);
			G[u].push_back(v);
			G[v].push_back(u);
		}
		deep[1] = 1; Max = 1;
		fa[1] = 0;
		DFS(1);
		if (Max > n / k)
		{
			puts("PATH");
			vector <int> res;
			int it = pos;
			while (it)
			{
				res.push_back(it);
				it = fa[it];
			}
			int len = res.size();
			printf("%d\n", len);
			for (int i = 0; i < len; ++i) printf("%d%c", res[i], " \n"[i == len - 1]);
		}
		else
		{
			puts("CYCLES");
			memset(vis, 0, sizeof vis);
			memset(used, 0, sizeof used);
			work(1);
			for (int i = 0; i < k; ++i)
			{
				auto it = res[i];
				int len = it.size();
				printf("%d\n", len);
				for (int j = 0; j < len; ++j) printf("%d%c", it[j], " \n"[j == len - 1]);
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define N 300010
int n, m ,k;
vector <int> G[N];

int fa[N], vis[N], deep[N], Max, pos;
void DFS(int u)
{
	vis[u] = 1;
	if (deep[u] > Max)
	{
		Max = deep[u];
		pos = u;
	}
	for (auto v : G[u]) if (!vis[v])
	{
		fa[v] = u;
		deep[v] = deep[u] + 1;
		DFS(v);
	}
}

vector < vector <int> > res;
int isleaf[N];
void work(int u)
{
	vis[u] = 1;
	if (!isleaf[u])
	{
		if (res.size() >= k) return;
		int x = -1, y = -1;
		for (auto v : G[u]) if (v != fa[u])
		{
			if (x == -1) x = v;
			else if (y == -1) y = v;
			else break;
		}
		if (deep[x] > deep[y]) swap(x, y);
		vector <int> tmp; int it = -1, top = -1;
		if ((deep[u] - deep[y] + 1) % 3)
		{
			it = u; top = fa[y];
		}
		else if ((deep[u] - deep[x] + 1) % 3)
		{
			it = u; top = fa[x];
		}
		else
		{
			tmp.push_back(u);
			it = y; top = fa[x];
		}
		while (it != top) tmp.push_back(it), it = fa[it];
		res.push_back(tmp);
	}
	else for (auto v : G[u]) if (!vis[v]) work(v);
}

int main()
{
	while (scanf("%d%d%d", &n, &m, &k) != EOF)
	{
		for (int i = 1; i <= n; ++i) G[i].clear();
		for (int i = 1, u, v; i <= m; ++i)
		{
			scanf("%d%d", &u, &v);
			G[u].push_back(v);
			G[v].push_back(u);
		}
		deep[1] = 1; Max = 1;
		fa[1] = 0;
		DFS(1);
		if (Max > n / k)
		{
			puts("PATH");
			vector <int> res;
			int it = pos;
			while (it)
			{
				res.push_back(it);
				it = fa[it];
			}
			int len = res.size();
			printf("%d\n", len);
			for (int i = 0; i < len; ++i) printf("%d%c", res[i], " \n"[i == len - 1]);
		}
		else
		{
			puts("CYCLES");
			memset(vis, 0, sizeof vis);
			memset(isleaf, 0, sizeof isleaf);
			for (int i = 1; i <= n; ++i) isleaf[fa[i]] = 1;
			work(1);
			for (int i = 0; i < k; ++i)
			{
				auto it = res[i];
				int len = it.size();
				printf("%d\n", len);
				for (int j = 0; j < len; ++j) printf("%d%c", it[j], " \n"[j == len - 1]);
			}
		}
	}
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define N 251234
#define M 501234
struct Edge {
    int to, last;
};
Edge map[M<<1];
int top, last[N];
void addEdge(int u, int v) {
    map[++top].to = v;
    map[top].last = last[u];
    last[u] = top;
}
int vis[N];
int sta[N], dep[N], fa[N];
int stop;
int leaves[N], leavtop;
int maxdep, maxid;
void dfs(int w) {
    vis[w] = 1;
    sta[++stop] = w;
    int cnt = 0;
    for (int i = last[w]; i; i = map[i].last) {
        int to = map[i].to;
        if (!vis[to]) {
            dep[to] = dep[w] + 1;
            fa[to] = w;
            dfs(to);
            ++cnt;
        }
    }
    if (cnt == 0) {
        //????
        leaves[++leavtop] = w;
        if (dep[w] > maxdep) {
            maxdep = dep[w];
            maxid = w;
        }
    }
}
void gogogo(int id) {
    printf("PATH\n");
    printf("%d\n", dep[id]);
    while (id) {
        printf("%d ", id);
        id = fa[id];
    }
    printf("\n");
}
void circle(int id) {
    int g1 = 0, g2 = 0;
    for (int i = last[id]; i; i = map[i].last) {
        int to = map[i].to;
        if (dep[to] < dep[id] - 1) {
            if (g1 == 0)
                g1 = to;
            else if (g2 == 0)
                g2 = to;
            else
                break;
        }
    }
    if (dep[g1] > dep[g2])
        swap(g1, g2);
    int l1 = dep[id] - dep[g1] + 1;
    int l2 = dep[id] - dep[g2] + 1;
    int l3 = dep[g2] - dep[g1] + 1 + 1;
    int g = 0;
    if (l1 % 3 != 0) g = g1;
    if (l2 % 3 != 0) g = g2;
    if (g) {
        printf("%d\n", dep[id] - dep[g] + 1);
        while (id != g) {
            printf("%d ", id);
            id = fa[id];
        }
        printf("%d\n", g);
    }
    else {
        printf("%d\n", l3);
        printf("%d\n", id);
        id = g2;
        while (id != g1) {
            printf("%d ", id);
            id = fa[id];
        }
        printf("%d\n", g1);
    }
    //[id, g1]
    //[id, g2]
    //id, [g1,g2]
}
int main() {
    int n, m, k, u, v;
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 1; i <= m; ++i) {
        scanf("%d%d", &u, &v);
        addEdge(u, v);
        addEdge(v, u);
    }
    fa[1] = 0;
    dep[1] = 1;
    dfs(1);
    if (maxdep * k >= n) {
        gogogo(maxid);
    }
    else {
        printf("CYCLES\n");
        for (int i = 1; i <= k; ++i) {
            circle(leaves[i]);
        }
    }
    return 0;
}


//#define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<endl;

#define boost ios::sync_with_stdio(0); cin.tie(0)

#define fi first
#define se second
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)

typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;

const int N = 3e5 + 5;

/***************************************************************************/

vector<int> adj[N];

int vis[N];
vector<int> path;

bool checkPlease(int v, int k) {
	vis[v] = 1;
	path.pb(v);
	if((int) path.size() >= k) return true;

	for(auto it : adj[v]) {
		if(vis[it]) continue;
		if(checkPlease(it, k)) return true;
	}

	path.pop_back();
	return false;
}

int rem;
int pos[N];

void dfs(int v, int p) {
	vis[v] = 1;
	pos[v] = path.size();
	path.pb(v);

	int ok = 0;
	for(auto it : adj[v]) {
		if(vis[it]) continue;
		ok++;
	}

	if(ok) {
		for(auto it : adj[v]) {
			if(vis[it]) continue;
			dfs(it, v);
		}
	}
	else if(rem > 0) {

		int a, b; a = b = -1;
		for(auto it : adj[v]) {
			if(it == p) continue;
			if(a == -1) {
				a = it;
			}
			else {
				b = it;
				break;
			}
		}
		if(pos[b] < pos[a]) swap(a, b);
		int till = -1;
		if((pos[v] - pos[a]) & 1) till = a;
		if((pos[v] - pos[b]) & 1) till = b;

		if(till != -1) {
			cout<<pos[v] - pos[till] + 1<<"\n";
			int at = pos[v];
			while(at >= pos[till]) {
				cout<<path[at]<<" ";
				at--;
			}
		}
		else {
			cout<<pos[b] - pos[a] + 2<<"\n";
			cout<<v<<" ";
			int at = pos[b];
			while(at >= pos[a]) {
				cout<<path[at]<<" ";
				at--;
			}
		}
		cout<<"\n";
		rem--;
	}

	path.pop_back();
}

int main() {

	boost;
	int n, m, k; cin>>n>>m>>k;
	for(int i=1; i<=m; i++) {
		int a, b; cin>>a>>b;
		adj[a].pb(b), adj[b].pb(a);
	}
	if(checkPlease(1, n/k)) {
		cout<<"PATH\n";
		cout<<path.size()<<"\n";
		for(auto it : path) {
			cout<<it<<" ";
		}
		cout<<"\n";
		exit(0);
	}
	memset(vis, 0, sizeof vis);
	path.clear();

	cout<<"CYCLES\n";
	rem = k;
	dfs(1, 0);

	return 0;
}


//#define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<endl;

#define boost ios::sync_with_stdio(0); cin.tie(0)

#define fi first
#define se second
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)

typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;

const int N = 3e5 + 5;

/***************************************************************************/

vector<int> adj[N];

int vis[N];
vector<int> path;

bool checkPlease(int v, int k) {
	vis[v] = 1;
	path.pb(v);
	if((int) path.size() >= k) return true;

	for(auto it : adj[v]) {
		if(vis[it]) continue;
		if(checkPlease(it, k)) return true;
	}

	path.pop_back();
	return false;
}

int rem;
int pos[N];

void dfs(int v, int p) {
	vis[v] = 1;
	pos[v] = path.size();
	path.pb(v);

	int ok = 0;
	for(auto it : adj[v]) {
		if(vis[it]) continue;
		ok++;
	}

	if(ok) {
		for(auto it : adj[v]) {
			if(vis[it]) continue;
			dfs(it, v);
		}
	}
	else if(rem > 0) {

		int a, b; a = b = -1;
		for(auto it : adj[v]) {
			if(it == p) continue;
			if(a == -1) {
				a = it;
			}
			else {
				b = it;
				break;
			}
		}
		if(pos[b] < pos[a]) swap(a, b);
		int till = -1;
		if((pos[v] - pos[a]) % 3 != 2) till = a;
		if((pos[v] - pos[b]) % 3 != 2) till = b;

		if(till != -1) {
			cout<<pos[v] - pos[till] + 1<<"\n";
			int at = pos[v];
			while(at >= pos[till]) {
				cout<<path[at]<<" ";
				at--;
			}
		}
		else {
			cout<<pos[b] - pos[a] + 2<<"\n";
			cout<<v<<" ";
			int at = pos[b];
			while(at >= pos[a]) {
				cout<<path[at]<<" ";
				at--;
			}
		}
		cout<<"\n";
		rem--;
	}

	path.pop_back();
}

int main() {

	boost;
	int n, m, k; cin>>n>>m>>k;
	for(int i=1; i<=m; i++) {
		int a, b; cin>>a>>b;
		adj[a].pb(b), adj[b].pb(a);
	}
	if(checkPlease(1, n/k)) {
		cout<<"PATH\n";
		cout<<path.size()<<"\n";
		for(auto it : path) {
			cout<<it<<" ";
		}
		cout<<"\n";
		exit(0);
	}
	memset(vis, 0, sizeof vis);
	path.clear();

	cout<<"CYCLES\n";
	rem = k;
	dfs(1, 0);

	return 0;
}


//#define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<endl;

#define boost ios::sync_with_stdio(0); cin.tie(0)

#define fi first
#define se second
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)

typedef long long ll;
typedef double ld;
typedef pair<int, int> pii;

const int N = 3e5 + 5;

/***************************************************************************/

vector<int> adj[N];

int vis[N];
vector<int> path;

bool checkPlease(int v, int k) {
	vis[v] = 1;
	path.pb(v);
	if((int) path.size() >= k) return true;

	for(auto it : adj[v]) {
		if(vis[it]) continue;
		if(checkPlease(it, k)) return true;
	}

	path.pop_back();
	return false;
}

int rem;
int pos[N];

void dfs(int v, int p) {
	vis[v] = 1;
	pos[v] = path.size();
	path.pb(v);

	int ok = 0;
	for(auto it : adj[v]) {
		if(vis[it]) continue;
		ok++;
	}

	if(ok) {
		for(auto it : adj[v]) {
			if(vis[it]) continue;
			dfs(it, v);
		}
	}
	else if(rem > 0) {

		int a, b; a = b = -1;
		for(auto it : adj[v]) {
			if(it == p) continue;
			if(a == -1) {
				a = it;
			}
			else {
				b = it;
				break;
			}
		}
		if(pos[b] < pos[a]) swap(a, b);
		int till = -1;
		if((pos[v] - pos[a]) % 3 != 2) till = a;
		if((pos[v] - pos[b]) % 3 != 2) till = b;

		if(till != -1) {
			cout<<pos[v] - pos[till] + 1<<"\n";
			int at = pos[v];
			while(at >= pos[till]) {
				cout<<path[at]<<" ";
				at--;
			}
		}
		else {
			cout<<pos[b] - pos[a] + 2<<"\n";
			cout<<v<<" ";
			int at = pos[b];
			while(at >= pos[a]) {
				cout<<path[at]<<" ";
				at--;
			}
		}
		cout<<"\n";
		rem--;
	}

	path.pop_back();
}

int main() {

	boost;
	int n, m, k; cin>>n>>m>>k;
	for(int i=1; i<=m; i++) {
		int a, b; cin>>a>>b;
		adj[a].pb(b), adj[b].pb(a);
	}
	int pathLength = n / k;
	if(n % k) pathLength++;
	if(checkPlease(1, pathLength)) {
		cout<<"PATH\n";
		cout<<path.size()<<"\n";
		for(auto it : path) {
			cout<<it<<" ";
		}
		cout<<"\n";
		exit(0);
	}
	memset(vis, 0, sizeof vis);
	path.clear();

	cout<<"CYCLES\n";
	rem = k;
	dfs(1, 0);

	return 0;
}


//by Shriram Lokhande
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define forstl(i,v) for(auto &i: v)
#define forn(i,e) for(int i = 0; i < e; i++)
#define forsn(i,s,e) for(int i = s; i < e; i++)
#define rforn(i,s) for(int i = s; i >= 0; i--)
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
#define clz(a) __builtin_clz(a) // count leading zeroes
#define ctz(a) __builtin_ctz(a) // count trailing zeroes
#define popc(a) __builtin_popcount(a) // count set bits
#define ln "\n"
#define kyahai(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); \
stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); cout<<ln; }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << "\t\t";
	err(++it, args...);
}
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define all(n) n.begin() , n.end()
#define tfi first.first
#define tse first.second
#define tth second
typedef long long ll;
typedef long double ld;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
typedef map<int,int> m32;
typedef pair< pair<int,int> , int> tri;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
//like set just find_by_order() and order_of_key() are extra

#pragma GCC optimize ("-O3")
template < typename tp > void in( tp & dig ){
    char ch=getchar();dig=0;ll flag=0;
    while(!isdigit(ch)){ if(ch=='-')flag=1;ch=getchar(); }
    while(isdigit(ch))dig=dig*10+ch-'0',ch=getchar();
    if(flag)dig=-dig;
}
template <typename T> void chkmax(T &x, T y) {x = max(x, y); }
template <typename T> void chkmin(T &x, T y) {x = min(x, y); }
const int LIM = 2e5+5 ,MOD = 1e9+7;
const double EPS = 1e-9;
int n , m , t ,k, x ,y ;
vv32 adj;
int p[LIM] , h[LIM] , vis[LIM] , lf[LIM] ;
int ansp = 0 , ansu = 0,ansv = 0, ansl = 0;
p32 dfs(int u){
	int ch = 0;
	vis[u] = 1;
	vp32 ref;
	lf[u] = 1;
	forstl(j,adj[u]) if(vis[j] == 0){
		ch++;
		lf[u] = 0;
		p[j] = u;
		h[j] = h[u] + 1;
		ref.pb(dfs(j));
	}
	sort(all(ref),greater<p32>());
	if(ch >= 2 ){
		if(ansl < ref[0].fi + ref[1].fi + 1){
			ansp = u;
			ansu = ref[0].se;
			ansv = ref[1].se;
			ansl = ref[0].fi + ref[1].fi + 1;
		}
	}
	if(ch == 0){
		return mp(1,u);
	}
	if(ch == 1){
		if(ansl < ref[0].fi + 1 ){
			ansu = ansp = u;
			ansv = ref[0].se;
			ansl =ref[0].fi + 1;
		}
	}
	return mp(ref[0].fi+1,ref[0].se);
}
int main()
{
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	cin>>n>>m>>k;
	adj.assign(n+2,v32(0));
	forn(i,m){
		cin>>x>>y;
		adj[x].pb(y);
		adj[y].pb(x);
	}
	dfs(1);
	int req = (n+k-1)/k;
	kyahai(req);
	if(ansl >= req){
		cout<<"PATH"<<ln;
		cout<<ansl<<ln;
		v32 a , b;
		while(ansu != ansp){
			a.pb(ansu);
			ansu = p[ansu];
		}
		while(ansv != ansp){
			b.pb(ansv);
			ansv = p[ansv];
		}
		reverse(all(b));
		forstl(j,a) cout<<j<<' ';
		cout<<ansp<<' ';
		forstl(j,b) cout<<j<<' ';
		return 0;
	}

	v32 lfs;
	forn(i,n) if(lf[i+1] == 1) lfs.pb(i+1);
	int i = 0;
	if((int)lfs.size() >= k){
		cout<<"CYCLES"<<ln;
		forstl(u,lfs){
			ansu = u; ansv = -1;
			forstl(j,adj[u]) if( (j != p[u]) && ((h[u] - h[j]+1) %3 != 0)) ansv = j;
			v32 wer;
			if(ansv == -1){
				 forstl(j,adj[u]){
				 	if((j!=p[u]) && ((int)wer.size() < 2)) wer.pb(j);
				 }
				 if(h[wer[0]] > h[wer[1]]) swap(wer[0],wer[1]);
				 p[u] = wer[1];
				 ansv = wer[0];
				 h[u] =h[wer[1]]+1;
			}
			cout<<h[ansu] - h[ansv] + 1<<ln;
			while(ansu != ansv){
				cout<<ansu<<" ";
				ansu = p[ansu];
			}
			cout<<ansv<<ln;
			i++;
			if(i == k) break;
		}
		return 0;
	}

	cout<<-1<<ln;

	return 0;
}


//by Shriram Lokhande
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define forstl(i,v) for(auto &i: v)
#define forn(i,e) for(int i = 0; i < e; i++)
#define forsn(i,s,e) for(int i = s; i < e; i++)
#define rforn(i,s) for(int i = s; i >= 0; i--)
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
#define clz(a) __builtin_clz(a) // count leading zeroes
#define ctz(a) __builtin_ctz(a) // count trailing zeroes
#define popc(a) __builtin_popcount(a) // count set bits
#define ln "\n"
#define kyahai(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); \
stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); cout<<ln; }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << "\t\t";
	err(++it, args...);
}
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define all(n) n.begin() , n.end()
#define tfi first.first
#define tse first.second
#define tth second
typedef long long ll;
typedef long double ld;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
typedef map<int,int> m32;
typedef pair< pair<int,int> , int> tri;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
//like set just find_by_order() and order_of_key() are extra

#pragma GCC optimize ("-O3")
template < typename tp > void in( tp & dig ){
    char ch=getchar();dig=0;ll flag=0;
    while(!isdigit(ch)){ if(ch=='-')flag=1;ch=getchar(); }
    while(isdigit(ch))dig=dig*10+ch-'0',ch=getchar();
    if(flag)dig=-dig;
}
template <typename T> void chkmax(T &x, T y) {x = max(x, y); }
template <typename T> void chkmin(T &x, T y) {x = min(x, y); }
const int LIM = 2.5e5+5 ,MOD = 1e9+7;
const double EPS = 1e-9;
int n , m , t ,k, x ,y ;
vv32 adj;
int p[LIM] , h[LIM] , vis[LIM] , lf[LIM] ;
int ansp = 0 , ansu = 0,ansv = 0, ansl = 0;
p32 dfs(int u){
	int ch = 0;
	vis[u] = 1;
	vp32 ref;
	lf[u] = 1;
	forstl(j,adj[u]) if(vis[j] == 0){
		ch++;
		lf[u] = 0;
		p[j] = u;
		h[j] = h[u] + 1;
		ref.pb(dfs(j));
	}
	sort(all(ref),greater<p32>());
	if(ch >= 2 ){
		if(ansl < ref[0].fi + ref[1].fi + 1){
			ansp = u;
			ansu = ref[0].se;
			ansv = ref[1].se;
			ansl = ref[0].fi + ref[1].fi + 1;
		}
	}
	if(ch == 0){
		return mp(1,u);
	}
	if(ch == 1){
		if(ansl < ref[0].fi + 1 ){
			ansu = ansp = u;
			ansv = ref[0].se;
			ansl =ref[0].fi + 1;
		}
	}
	return mp(ref[0].fi+1,ref[0].se);
}
int main()
{
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	cin>>n>>m>>k;
	adj.assign(n+2,v32(0));
	forn(i,m){
		cin>>x>>y;
		adj[x].pb(y);
		adj[y].pb(x);
	}
	dfs(1);
	int req = (n+k-1)/k;
	kyahai(req);
	if(ansl >= req){
		cout<<"PATH"<<ln;
		cout<<ansl<<ln;
		v32 a , b;
		while(ansu != ansp){
			a.pb(ansu);
			ansu = p[ansu];
		}
		while(ansv != ansp){
			b.pb(ansv);
			ansv = p[ansv];
		}
		reverse(all(b));
		forstl(j,a) cout<<j<<' ';
		cout<<ansp<<' ';
		forstl(j,b) cout<<j<<' ';
		return 0;
	}

	v32 lfs;
	forn(i,n) if(lf[i+1] == 1) lfs.pb(i+1);
	int i = 0;
	if((int)lfs.size() >= k){
		cout<<"CYCLES"<<ln;
		forstl(u,lfs){
			ansu = u; ansv = -1;
			forstl(j,adj[u]) if( (j != p[u]) && ((h[u] - h[j]+1) %3 != 0)) ansv = j;
			v32 wer;
			if(ansv == -1){
				 forstl(j,adj[u]){
				 	if((j!=p[u]) && ((int)wer.size() < 2)) wer.pb(j);
				 }
				 if(h[wer[0]] > h[wer[1]]) swap(wer[0],wer[1]);
				 p[u] = wer[1];
				 ansv = wer[0];
				 h[u] =h[wer[1]]+1;
			}
			cout<<h[ansu] - h[ansv] + 1<<ln;
			while(ansu != ansv){
				cout<<ansu<<" ";
				ansu = p[ansu];
			}
			cout<<ansv<<ln;
			i++;
			if(i == k) break;
		}
		return 0;
	}

	cout<<-1<<ln;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <stdio.h>
#include <math.h>
#include <stack>
#include <queue>
#include <tuple>

#define forn(i,n) for(int i=0;i<n;i++)
#define ll long long
#define ld long double
#define mp make_pair
#define pii pair<int,int>

#pragma optimize

using namespace std;

int n, k;

bool dfs(int v, vector<int>&range, vector<vector<int>>&g, vector<bool>&used, vector<int>&ans, vector<int>&list,vector<int>&last) {
	used[v] = 1;
	if (range[v]*k >= n) {
		ans.push_back(v);
		return 1;
	}
	bool f = 1;
	for (int i : g[v])if(!used[i]) {
		f = 0;
		last[i] = v;
		range[i] = range[v] + 1;
		if (dfs(i, range, g, used, ans, list,last)) {
			ans.push_back(v);
			return 1;
		}
	}
	if (f)list.push_back(v);
	return 0;
}

vector<int> get_cycle(int v, vector<int>&last,vector<int>&range, vector<vector<int>>&g) {
	vector<pii>vr;
	for (int i : g[v])if(last[v]!=i) {
		vr.push_back(mp(range[i], i));
	}
	sort(vr.begin(), vr.end());
	int t = 0;
	int min_l = g.size() + 1;
	int id = 0;
	forn(i, vr.size()) {
		int l = range[v] - vr[i].first + 1;
		if (min_l > l && l%3!=0) {
			min_l = l;
			id = i;
			t = 0;
		}
		if (i > 0) {
			l = vr[i].first - vr[i - 1].first + 2;
			if (min_l > l && l % 3 != 0) {
				min_l = l;
				id = i;
				t = 1;
			}
		}
		if (i > 1) {
			l = vr[i].first - vr[i - 2].first + 2;
			if (min_l > l && l % 3 != 0) {
				min_l = l;
				id = i;
				t = 2;
			}
		}
	}
	vector<int>ans;
	ans.push_back(v);
	if (t == 0) {
		int x = v;
		while (x != vr[id].second) {
			x = last[x];
			ans.push_back(x);
		}
		return ans;
	}
	int x = vr[id].second;
	ans.push_back(x);
	while (x != vr[id - t].second) {
		x = last[x];
		ans.push_back(x);
	}
	return ans;
}

int get_cycle_len(int v, vector<int>&last, vector<int>&range, vector<vector<int>>&g) {
	vector<pii>vr;
	for (int i : g[v])if (last[v] != i) {
		vr.push_back(mp(range[i], i));
	}
	sort(vr.begin(), vr.end());
	int t = 0;
	int min_l = g.size() + 1;
	int id = 0;
	forn(i, vr.size()) {
		int l = range[v] - vr[i].first + 1;
		if (min_l > l && l % 3 != 0) {
			min_l = l;
			id = i;
			t = 0;
		}
		if (i > 0) {
			l = vr[i].first - vr[i - 1].first + 2;
			if (min_l > l && l % 3 != 0) {
				min_l = l;
				id = i;
				t = 1;
			}
		}
		if (i > 1) {
			l = vr[i].first - vr[i - 2].first + 2;
			if (min_l > l && l % 3 != 0) {
				min_l = l;
				id = i;
				t = 2;
			}
		}
	}
	return min_l;
}

int main() {
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	int m;
	cin >> n >> m >> k;
	vector<vector<int>>g(n);
	forn(i, m) {
		int a, b;
		cin >> a >> b;
		--a;
		--b;
		g[a].push_back(b);
		g[b].push_back(a);
	}
	if (n == 1) {
		cout << "PATH\n1\n1";
		return 0;
	}
	vector<bool>used(n, 0);
	vector<int>last(n, -1);
	vector<int>range(n, 0);
	vector<int>ans, list;
	if (dfs(0, range, g, used, ans, list, last)) {
		cout << "PATH\n" << ans.size() << '\n';
		for (int i : ans)cout << i + 1 << ' ';
		return 0;
	}
	cout << "CYCLES\n";
	vector<pii>c_len(list.size());
	forn(i, list.size()) {
		c_len[i] = mp(get_cycle_len(list[i], last, range, g), list[i]);
	}
	sort(c_len.begin(), c_len.end());
	forn(i, k) {
		vector<int>ans = get_cycle(c_len[i].second, last, range, g);
		cout << ans.size() << '\n';
		for (int i : ans)cout << i + 1 << ' ';
		cout << '\n';
	}
}


// I make this just for fun because i'm done
// Aimi Haraguni >> Konomi Suzuki >> Yui >>  Ikimono Gakari >> Garnidelia >> Kalafina >> Eir Aoi.   .. dude?
// problems that involves any kind of persistent data structures are the best of the best, are not them?

#pragma GCC optimize ("Ofast,unroll-loops")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>

#define pb push_back
#define ff  first
#define ss second
#define tm1 first
#define tm2 second.first
#define tm3 second.second
#define sz(x) ll(x.size())
#define all(v) (v).begin(), (v).end()
// #define fill(x, v) memset(x, v, sizeof(x))
#define FER(i,a,b) for(int i=int(a); i< int(b); ++i)
#define IFR(i,a,b) for(int i=int(a); i>=int(b); --i )
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)

#define N 1400
// #define M 19
// #define mod3 9

#define mod1  998244353
#define mod 1000000007
#define mod2 1000000009
#define mody 998244353
#define bas 987625403
#define sqr(x) (x)*(x)
#define INF 3000000000000000000
#define N1 1000

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef pair<ll, ll> ii;
typedef pair<ll, ii > tri;
typedef vector<ll> vi;
typedef vector<vi> vv;
typedef vector<ii> vii;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> S_t;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

#define trace(...) fff(#__VA_ARGS__, __VA_ARGS__)
template<typename t> void fff(const char* x, t&& val1) { cout<<x<< " : "<<val1<<"\n";}
template<typename t1, typename... t2> void fff(const char* x, t1&& val1, t2&&... val2){
    const char* xd=strchr(x+1, ',');
    cout.write(x, xd-x)<<" : "<<val1<<" | ";
    fff(xd+1, val2...);
}

inline ll add(ll a, ll b) { return a+b < mod? a+b : a+b-mod;}
inline ll rem(ll a, ll b) { return a >= b? a - b: a- b + mod;}
inline ll mul(ll a, ll b) { return (long long) a*b%mod;}
inline void Mul(ll &a, ll b) { a = (long long) a*b%mod;}
inline ll bp(ll a, ll p){
    ll ret;
    for(ret = 1; p; p>>=1, Mul(a, a)) (p & 1) && (Mul(ret, a), 1);
    return ret;
}

static inline void read(ll &result) {
    bool minus = false;
    char ch;
    ch = getchar();
    while (true) {
        if (ch == '-') break;
        if (ch >= '0' and ch <= '9') break;
        ch = getchar();
    }
    (ch == '-')? minus = true: result = ch-'0';
    while (true) {
        ch = getchar();
        if (ch < '0' or ch > '9') break;
        result = (result<<3)+ (result<<1) + (ch - '0');
    }
    if(minus) result=-result;
}

// ini 1: 34
// fin 1: 56

vi adj[1<<20], graph[1<<20];
ll id[1<<20], d[1<<20], p[1<<20][20], be[1<<20], en[1<<20], gra[1<<20], boc;

inline ll find(ll x){
	while(x != id[x]) id[x] = id[id[x]], x = id[x];
	return x;
}

inline void unir(ll a, ll b){
	ll p = find(a), q = find(b);
	id[p] = id[q];
}

inline void dfs(ll u, ll pp, ll depth){
	p[u][0] = pp, d[u] = depth, be[u] = boc++;
	FER(i, 1, 19) if(p[u][i - 1] != -1) p[u][i] = p[p[u][i - 1]][i - 1];
	for(auto xd: adj[u]) if(xd != pp)
		dfs(xd, u, depth + 1);
	en[u] = boc++;
}

inline bool test(ll a, ll b){
	if(a == -1) return true;
	return be[a] <= be[b] and en[a] >= en[b];
}

inline ll lca(ll a, ll b){
	if(test(a, b)) return a;
	if(test(b, a)) return b;
	IFR(i, 18, 0) if(!test(p[a][i], b)) a = p[a][i];
	return p[a][0];
}

int main(){
	ll n, m, k; read(n), read(m), read(k);
	FER(i, 0, n) id[i] = i;
	FER(i, 0, m){
		ll a, b; read(a), read(b); a--, b--;
		graph[a].pb(b);
		graph[b].pb(a);
		if(find(a) != find(b)) {
			unir(a, b);
			adj[a].pb(b);
			adj[b].pb(a);
			gra[a]++;
			gra[b]++;
		}
	}
	auto root = [&](){
		boc = 0;
		FER(i, 0, n) FER(j, 0, 19) p[i][j] = -1;
		dfs(0, -1, 0);
		ll nod = -1, dd = -1;
		FER(i, 0, n) if(d[i] > dd) nod = i, dd = d[i];
		boc = 0;
		FER(i, 0, n) FER(j, 0, 19) p[i][j] = -1;
		dfs(nod, -1, 0);
		FER(i, 0, n) if(d[i] > dd) nod = i, dd = d[i];
		boc = 0;
		FER(i, 0, n) FER(j, 0, 19) p[i][j] = -1;
		dfs(nod, -1, 0);
	};
	root();
	auto dist = [&](ll a, ll b){
		return d[a] + d[b] - (d[lca(a, b)]<<1);
	};
	auto path = [&](){
		vi vec;
		FER(i, 0, n) if(d[i] >= n/k){
			while(i != -1){
				vec.pb(i);
				i = p[i][0];
			}
			break;
		}
		if(sz(vec)){
			cout<<"PATH\n";
			cout<<sz(vec)<<"\n";
			for(auto xd: vec) cout<<xd + 1<<" ";
			cout<<"\n";
			return 1;
		}
		return 0;
	};
	auto G = [&](ll a, ll b){
		ll c = lca(a, b);
		while(a != c){
			cout<<a + 1<<" ";
			a = p[a][0];
		}
		vi vec;
		while(b != c){
			vec.pb(b);
			b = p[b][0];
		}
		reverse(all(vec));
		cout<<c + 1<<" ";
		for(auto xd: vec) cout<<xd + 1<<" ";
		cout<<"\n";
	};
	auto cycles = [&](){
		vi leaves;
		FER(i, 1, n) if(gra[i] == 1) leaves.pb(i);
		FER(i, 0, k){
			auto a = leaves[i];
			auto b = p[a][0];
			vi other;
			for(auto xd: graph[a]){
				if(xd != b){
					other.pb(xd);
				}
			}
			ll x = other[0], y = other[1];
			// ciclos
			// a - x + 1
			// a - y + 1
			// x - y + 2
			ll d1 = dist(a, x) + 1;
			ll d2 = dist(a, y) + 1;
			ll d3 = dist(x, y) + 2;
			if(d1%3 and d1 > 3){
				cout<<d1<<"\n";
				G(a, x);
			}
			else if(d2%3 and d2 > 3){
				cout<<d2<<"\n";
				G(a, y);
			}
			else{
				cout<<d3<<"\n";
				cout<<a + 1<<" ";
				G(x, y);
			}
		}
	};
	auto ret = path();
	if(!ret){
		// need cycles
		cout<<"CYCLES\n";
		cycles();
	}
	return 0;
}


// I make this just for fun because i'm done
// Aimi Haraguni >> Konomi Suzuki >> Yui >>  Ikimono Gakari >> Garnidelia >> Kalafina >> Eir Aoi.   .. dude?
// problems that involves any kind of persistent data structures are the best of the best, are not them?

#pragma GCC optimize ("Ofast,unroll-loops")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>

#define pb push_back
#define ff  first
#define ss second
#define tm1 first
#define tm2 second.first
#define tm3 second.second
#define sz(x) ll(x.size())
#define all(v) (v).begin(), (v).end()
// #define fill(x, v) memset(x, v, sizeof(x))
#define FER(i,a,b) for(int i=int(a); i< int(b); ++i)
#define IFR(i,a,b) for(int i=int(a); i>=int(b); --i )
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)

#define N 1400
// #define M 19
// #define mod3 9

#define mod1  998244353
#define mod 1000000007
#define mod2 1000000009
#define mody 998244353
#define bas 987625403
#define sqr(x) (x)*(x)
#define INF 3000000000000000000
#define N1 1000

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef pair<ll, ll> ii;
typedef pair<ll, ii > tri;
typedef vector<ll> vi;
typedef vector<vi> vv;
typedef vector<ii> vii;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> S_t;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

#define trace(...) fff(#__VA_ARGS__, __VA_ARGS__)
template<typename t> void fff(const char* x, t&& val1) { cout<<x<< " : "<<val1<<"\n";}
template<typename t1, typename... t2> void fff(const char* x, t1&& val1, t2&&... val2){
    const char* xd=strchr(x+1, ',');
    cout.write(x, xd-x)<<" : "<<val1<<" | ";
    fff(xd+1, val2...);
}

inline ll add(ll a, ll b) { return a+b < mod? a+b : a+b-mod;}
inline ll rem(ll a, ll b) { return a >= b? a - b: a- b + mod;}
inline ll mul(ll a, ll b) { return (long long) a*b%mod;}
inline void Mul(ll &a, ll b) { a = (long long) a*b%mod;}
inline ll bp(ll a, ll p){
    ll ret;
    for(ret = 1; p; p>>=1, Mul(a, a)) (p & 1) && (Mul(ret, a), 1);
    return ret;
}

static inline void read(ll &result) {
    bool minus = false;
    char ch;
    ch = getchar();
    while (true) {
        if (ch == '-') break;
        if (ch >= '0' and ch <= '9') break;
        ch = getchar();
    }
    (ch == '-')? minus = true: result = ch-'0';
    while (true) {
        ch = getchar();
        if (ch < '0' or ch > '9') break;
        result = (result<<3)+ (result<<1) + (ch - '0');
    }
    if(minus) result=-result;
}

// ini 1: 34
// fin 1: 56

vi adj[1<<20], graph[1<<20];
ll id[1<<20], d[1<<20], p[1<<20][20], be[1<<20], en[1<<20], gra[1<<20], boc;

inline ll find(ll x){
	while(x != id[x]) id[x] = id[id[x]], x = id[x];
	return x;
}

inline void unir(ll a, ll b){
	ll p = find(a), q = find(b);
	id[p] = id[q];
}

inline void dfs(ll u, ll pp, ll depth){
	p[u][0] = pp, d[u] = depth, be[u] = boc++;
	FER(i, 1, 19) if(p[u][i - 1] != -1) p[u][i] = p[p[u][i - 1]][i - 1];
	for(auto xd: adj[u]) if(xd != pp)
		dfs(xd, u, depth + 1);
	en[u] = boc++;
}

inline bool test(ll a, ll b){
	if(a == -1) return true;
	return be[a] <= be[b] and en[a] >= en[b];
}

inline ll lca(ll a, ll b){
	if(test(a, b)) return a;
	if(test(b, a)) return b;
	IFR(i, 18, 0) if(!test(p[a][i], b)) a = p[a][i];
	return p[a][0];
}

int main(){
	ll n, m, k; read(n), read(m), read(k);
	FER(i, 0, n) id[i] = i;
	FER(i, 0, m){
		ll a, b; read(a), read(b); a--, b--;
		graph[a].pb(b);
		graph[b].pb(a);
		if(find(a) != find(b)) {
			unir(a, b);
			adj[a].pb(b);
			adj[b].pb(a);
			gra[a]++;
			gra[b]++;
		}
	}
	boc = 0;
	FER(i, 0, n) FER(j, 0, 19) p[i][j] = -1;
	dfs(0, -1, 0);
	auto dist = [&](ll a, ll b){
		return d[a] + d[b] - (d[lca(a, b)]<<1);
	};
	auto path = [&](){
		vi vec;
		FER(i, 0, n) if(d[i] >= n/k){
			while(i != -1){
				vec.pb(i);
				i = p[i][0];
			}
			break;
		}
		if(sz(vec)){
			cout<<"PATH\n";
			cout<<sz(vec)<<"\n";
			for(auto xd: vec) cout<<xd + 1<<" ";
			cout<<"\n";
			return 1;
		}
		return 0;
	};
	auto G = [&](ll a, ll b){
		ll c = lca(a, b);
		while(a != c){
			cout<<a + 1<<" ";
			a = p[a][0];
		}
		vi vec;
		while(b != c){
			vec.pb(b);
			b = p[b][0];
		}
		reverse(all(vec));
		cout<<c + 1<<" ";
		for(auto xd: vec) cout<<xd + 1<<" ";
		cout<<"\n";
	};
	auto cycles = [&](){
		vi leaves;
		FER(i, 1, n) if(gra[i] == 1) leaves.pb(i);
		FER(i, 0, k){
			auto a = leaves[i];
			auto b = p[a][0];
			vi other;
			for(auto xd: graph[a]){
				if(xd != b){
					other.pb(xd);
				}
			}
			ll x = other[0], y = other[1];
			// ciclos
			// a - x + 1
			// a - y + 1
			// x - y + 2
			ll d1 = dist(a, x) + 1;
			ll d2 = dist(a, y) + 1;
			ll d3 = dist(x, y) + 2;
			if(d1%3 and d1 > 3){
				cout<<d1<<"\n";
				G(a, x);
			}
			else if(d2%3 and d2 > 3){
				cout<<d2<<"\n";
				G(a, y);
			}
			else{
				cout<<d3<<"\n";
				cout<<a + 1<<" ";
				G(x, y);
			}
		}
	};
	auto ret = path();
	if(!ret){
		// need cycles
		cout<<"CYCLES\n";
		cycles();
	}
	return 0;
}


// I make this just for fun because i'm done
// Aimi Haraguni >> Konomi Suzuki >> Yui >>  Ikimono Gakari >> Garnidelia >> Kalafina >> Eir Aoi.   .. dude?
// problems that involves any kind of persistent data structures are the best of the best, are not them?

#pragma GCC optimize ("Ofast,unroll-loops")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>

#define pb push_back
#define ff  first
#define ss second
#define tm1 first
#define tm2 second.first
#define tm3 second.second
#define sz(x) ll(x.size())
#define all(v) (v).begin(), (v).end()
// #define fill(x, v) memset(x, v, sizeof(x))
#define FER(i,a,b) for(int i=int(a); i< int(b); ++i)
#define IFR(i,a,b) for(int i=int(a); i>=int(b); --i )
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)

#define N 1400
// #define M 19
// #define mod3 9

#define mod1  998244353
#define mod 1000000007
#define mod2 1000000009
#define mody 998244353
#define bas 987625403
#define sqr(x) (x)*(x)
#define INF 3000000000000000000
#define N1 1000

using namespace std;
using namespace __gnu_pbds;

typedef int ll;
typedef pair<ll, ll> ii;
typedef pair<ll, ii > tri;
typedef vector<ll> vi;
typedef vector<vi> vv;
typedef vector<ii> vii;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> S_t;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

#define trace(...) fff(#__VA_ARGS__, __VA_ARGS__)
template<typename t> void fff(const char* x, t&& val1) { cout<<x<< " : "<<val1<<"\n";}
template<typename t1, typename... t2> void fff(const char* x, t1&& val1, t2&&... val2){
    const char* xd=strchr(x+1, ',');
    cout.write(x, xd-x)<<" : "<<val1<<" | ";
    fff(xd+1, val2...);
}

inline ll add(ll a, ll b) { return a+b < mod? a+b : a+b-mod;}
inline ll rem(ll a, ll b) { return a >= b? a - b: a- b + mod;}
inline ll mul(ll a, ll b) { return (long long) a*b%mod;}
inline void Mul(ll &a, ll b) { a = (long long) a*b%mod;}
inline ll bp(ll a, ll p){
    ll ret;
    for(ret = 1; p; p>>=1, Mul(a, a)) (p & 1) && (Mul(ret, a), 1);
    return ret;
}

static inline void read(ll &result) {
    bool minus = false;
    char ch;
    ch = getchar();
    while (true) {
        if (ch == '-') break;
        if (ch >= '0' and ch <= '9') break;
        ch = getchar();
    }
    (ch == '-')? minus = true: result = ch-'0';
    while (true) {
        ch = getchar();
        if (ch < '0' or ch > '9') break;
        result = (result<<3)+ (result<<1) + (ch - '0');
    }
    if(minus) result=-result;
}

// ini 1: 34
// fin 1: 56

vi adj[1<<20], graph[1<<20];
ll id[1<<20], d[1<<20], p[1<<20][20], be[1<<20], en[1<<20], gra[1<<20], boc;

inline ll find(ll x){
	while(x != id[x]) id[x] = id[id[x]], x = id[x];
	return x;
}

inline void unir(ll a, ll b){
	ll p = find(a), q = find(b);
	id[p] = id[q];
}

inline void dfs(ll u, ll pp, ll depth){
	p[u][0] = pp, d[u] = depth, be[u] = boc++;
	FER(i, 1, 19) if(p[u][i - 1] != -1) p[u][i] = p[p[u][i - 1]][i - 1];
	for(auto xd: adj[u]) if(xd != pp)
		dfs(xd, u, depth + 1);
	en[u] = boc++;
}

ll vis[1<<20];

inline void bfs(ll u, ll pp, ll depth){
	vis[u]++;
	d[u] = depth;
	for(auto xd: graph[u]){
		if(!vis[xd]) {
			adj[u].pb(xd);
			adj[xd].pb(u);
			bfs(xd, u, depth + 1);
		}
	}
}

inline bool test(ll a, ll b){
	if(a == -1) return true;
	return be[a] <= be[b] and en[a] >= en[b];
}

inline ll lca(ll a, ll b){
	if(test(a, b)) return a;
	if(test(b, a)) return b;
	IFR(i, 18, 0) if(!test(p[a][i], b)) a = p[a][i];
	return p[a][0];
}

int main(){
	ll n, m, k; read(n), read(m), read(k);
	FER(i, 0, n) id[i] = i;
	FER(i, 0, m){
		ll a, b; read(a), read(b); a--, b--;
		graph[a].pb(b);
		graph[b].pb(a);
	}
	ll node = 0;
	bfs(0, -1, 0);
	boc = 0;
	FER(i, 0, n) FER(j, 0, 19) p[i][j] = -1;
	dfs(0, -1, 0);
	auto dist = [&](ll a, ll b){
		return d[a] + d[b] - (d[lca(a, b)]<<1);
	};
	auto path = [&](){
		vi vec;
		FER(i, 0, n) if(d[i] >= n/k){
			while(i != -1){
				vec.pb(i);
				i = p[i][0];
			}
			break;
		}
		if(sz(vec)){
			cout<<"PATH\n";
			cout<<sz(vec)<<"\n";
			for(auto xd: vec) cout<<xd + 1<<" ";
			cout<<"\n";
			return 1;
		}
		return 0;
	};
	auto G = [&](ll a, ll b){
		ll c = lca(a, b);
		while(a != c){
			cout<<a + 1<<" ";
			a = p[a][0];
		}
		vi vec;
		while(b != c){
			vec.pb(b);
			b = p[b][0];
		}
		reverse(all(vec));
		cout<<c + 1<<" ";
		for(auto xd: vec) cout<<xd + 1<<" ";
		cout<<"\n";
	};
	auto cycles = [&](){
		vi leaves;
		vi vis(n, 0);
		FER(i, 0, n) if(sz(adj[i]) == 1 and i != node) leaves.pb(i), vis[i]++;
		FER(i, 0, k){
			auto a = leaves[i];
			auto b = p[a][0];
			vi other;
			for(auto xd: graph[a]){
				if(xd != b and !vis[xd]){
					other.pb(xd);
				}
			}
			ll x = other[0], y = other[1];
			// ciclos
			// a - x + 1
			// a - y + 1
			// x - y + 2
			ll d1 = dist(a, x) + 1;
			ll d2 = dist(a, y) + 1;
			ll d3 = dist(x, y) + 2;
			if(d1%3 and d1 > 3){
				cout<<d1<<"\n";
				G(a, x);
			}
			else if(d2%3 and d2 > 3){
				cout<<d2<<"\n";
				G(a, y);
			}
			else{
				cout<<d3<<"\n";
				cout<<a + 1<<" ";
				G(x, y);
			}
		}
	};
	auto ret = path();
	if(!ret){
		// need cycles
		cout<<"CYCLES\n";
		cycles();
	}
	return 0;
}


// I make this just for fun because i'm done
// Aimi Haraguni >> Konomi Suzuki >> Yui >>  Ikimono Gakari >> Garnidelia >> Kalafina >> Eir Aoi.   .. dude?
// problems that involves any kind of persistent data structures are the best of the best, are not them?

#pragma GCC optimize ("Ofast,unroll-loops")
// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>

#define pb push_back
#define ff  first
#define ss second
#define tm1 first
#define tm2 second.first
#define tm3 second.second
#define sz(x) ll(x.size())
#define all(v) (v).begin(), (v).end()
// #define fill(x, v) memset(x, v, sizeof(x))
#define FER(i,a,b) for(int i=int(a); i< int(b); ++i)
#define IFR(i,a,b) for(int i=int(a); i>=int(b); --i )
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)

#define N 1400
// #define M 19
// #define mod3 9

#define mod1  998244353
#define mod 1000000007
#define mod2 1000000009
#define mody 998244353
#define bas 987625403
#define sqr(x) (x)*(x)
#define INF 3000000000000000000
#define N1 1000

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef pair<ll, ll> ii;
typedef pair<ll, ii > tri;
typedef vector<ll> vi;
typedef vector<vi> vv;
typedef vector<ii> vii;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> S_t;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

#define trace(...) fff(#__VA_ARGS__, __VA_ARGS__)
template<typename t> void fff(const char* x, t&& val1) { cout<<x<< " : "<<val1<<"\n";}
template<typename t1, typename... t2> void fff(const char* x, t1&& val1, t2&&... val2){
    const char* xd=strchr(x+1, ',');
    cout.write(x, xd-x)<<" : "<<val1<<" | ";
    fff(xd+1, val2...);
}

inline ll add(ll a, ll b) { return a+b < mod? a+b : a+b-mod;}
inline ll rem(ll a, ll b) { return a >= b? a - b: a- b + mod;}
inline ll mul(ll a, ll b) { return (long long) a*b%mod;}
inline void Mul(ll &a, ll b) { a = (long long) a*b%mod;}
inline ll bp(ll a, ll p){
    ll ret;
    for(ret = 1; p; p>>=1, Mul(a, a)) (p & 1) && (Mul(ret, a), 1);
    return ret;
}

static inline void read(ll &result) {
    bool minus = false;
    char ch;
    ch = getchar();
    while (true) {
        if (ch == '-') break;
        if (ch >= '0' and ch <= '9') break;
        ch = getchar();
    }
    (ch == '-')? minus = true: result = ch-'0';
    while (true) {
        ch = getchar();
        if (ch < '0' or ch > '9') break;
        result = (result<<3)+ (result<<1) + (ch - '0');
    }
    if(minus) result=-result;
}

// ini 1: 34
// fin 1: 56

vi adj[1<<20], graph[1<<20];
ll id[1<<20], d[1<<20], p[1<<20][20], be[1<<20], en[1<<20], gra[1<<20], boc;

inline ll find(ll x){
	while(x != id[x]) id[x] = id[id[x]], x = id[x];
	return x;
}

inline void unir(ll a, ll b){
	ll p = find(a), q = find(b);
	id[p] = id[q];
}

inline void dfs(ll u, ll pp, ll depth){
	p[u][0] = pp, d[u] = depth, be[u] = boc++;
	FER(i, 1, 19) if(p[u][i - 1] != -1) p[u][i] = p[p[u][i - 1]][i - 1];
	for(auto xd: adj[u]) if(xd != pp)
		dfs(xd, u, depth + 1);
	en[u] = boc++;
}

ll vis[1<<20];

inline void bfs(ll u, ll pp, ll depth){
	vis[u]++;
	d[u] = depth;
	for(auto xd: graph[u]){
		if(!vis[xd]) {
			adj[u].pb(xd);
			adj[xd].pb(u);
			bfs(xd, u, depth + 1);
		}
	}
}

inline bool test(ll a, ll b){
	if(a == -1) return true;
	return be[a] <= be[b] and en[a] >= en[b];
}

inline ll lca(ll a, ll b){
	if(test(a, b)) return a;
	if(test(b, a)) return b;
	IFR(i, 18, 0) if(!test(p[a][i], b)) a = p[a][i];
	return p[a][0];
}

int main(){
	ll n, m, k; read(n), read(m), read(k);
	FER(i, 0, n) id[i] = i;
	FER(i, 0, m){
		ll a, b; read(a), read(b); a--, b--;
		graph[a].pb(b);
		graph[b].pb(a);
	}
	ll node = 0;
	bfs(0, -1, 0);
	boc = 0;
	FER(i, 0, n) FER(j, 0, 19) p[i][j] = -1;
	dfs(0, -1, 0);
	auto dist = [&](ll a, ll b){
		return d[a] + d[b] - (d[lca(a, b)]<<1);
	};
	auto path = [&](){
		vi vec;
		FER(i, 0, n) if(d[i] >= n/k){
			while(i != -1){
				vec.pb(i);
				i = p[i][0];
			}
			break;
		}
		if(sz(vec)){
			cout<<"PATH\n";
			cout<<sz(vec)<<"\n";
			for(auto xd: vec) cout<<xd + 1<<" ";
			cout<<"\n";
			return 1;
		}
		return 0;
	};
	auto G = [&](ll a, ll b){
		ll c = lca(a, b);
		while(a != c){
			cout<<a + 1<<" ";
			a = p[a][0];
		}
		vi vec;
		while(b != c){
			vec.pb(b);
			b = p[b][0];
		}
		reverse(all(vec));
		cout<<c + 1<<" ";
		for(auto xd: vec) cout<<xd + 1<<" ";
		cout<<"\n";
	};
	auto cycles = [&](){
		vi leaves;
		vi vis(n, 0);
		FER(i, 0, n) if(sz(adj[i]) == 1 and i != node) leaves.pb(i), vis[i]++;
		FER(i, 0, k){
			auto a = leaves[i];
			auto b = p[a][0];
			vi other;
			for(auto xd: graph[a]){
				if(xd != b and !vis[xd]){
					other.pb(xd);
				}
			}
			ll x = other[0], y = other[1];
			// ciclos
			// a - x + 1
			// a - y + 1
			// x - y + 2
			ll d1 = dist(a, x) + 1;
			ll d2 = dist(a, y) + 1;
			ll d3 = dist(x, y) + 2;
			if(d1%3 and d1 > 3){
				cout<<d1<<"\n";
				G(a, x);
			}
			else if(d2%3 and d2 > 3){
				cout<<d2<<"\n";
				G(a, y);
			}
			else{
				cout<<d3<<"\n";
				cout<<a + 1<<" ";
				G(x, y);
			}
		}
	};
	auto ret = path();
	if(!ret){
		// need cycles
		cout<<"CYCLES\n";
		cycles();
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mod 1000000007
#define pb push_back
#define pi pair<ll,ll>
#define vi vector<ll>
#define vpi vector< pi >
const int N=300010;
vi v[N],g[N],w;
int a[N],l[N],dp[20][N];
int dfs(int x,int p=1)
{
	l[x]=l[p]+1;
	dp[x][0]=p;
	for(int i=1;i<20;i++)
		dp[x][i]=dp[dp[x][i-1]][i-1];
	a[x]=0;
	int r=0;
	for(int y:g[x])
	{
		if(y!=p)
		{
			int r1=dfs(y,x);
			if(r1>r)
				r=r1,a[x]=y;
		}
	}
	return r+1;
}
int lca(int x,int y)
{
	if(l[x]>l[y]) swap(x,y);
	for(int i=19;i>=0;i--)
	{
		if((l[y]-l[x])&(1<<i))
			y=dp[y][i];
	}
	if(x==y) return x;
	for(int i=19;i>=0;i--)
	{
		if(dp[x][i]!=dp[y][i])
			x=dp[x][i],y=dp[y][i];
	}
	return dp[x][0];
}
void print(int z,int y)
{
	w.clear();
	while(y!=z) w.pb(y),y=dp[y][0];
	w.pb(z);
	reverse(w.begin(), w.end());
	for(int y:w) printf("%d ", y);
	printf("\n");
}
bool vis[N];
int spanning(int x)
{
	vis[x]=1;
	for(int y:v[x]) if(!vis[y]) spanning(y),
		g[x].pb(y),g[y].pb(x);
}
int main()
{
	int n,m,k,x,y,z;
	cin>>n>>m>>k;
	while(m--)
	{
		scanf("%d %d",&x,&y);
		v[x].pb(y);
		v[y].pb(x);
	}
	spanning(1);
	y=dfs(1);
	if(y>=n/k)
	{
		x=1;
		printf("PATH\n%d\n",y);
		while(x) printf("%d ",x),x=a[x];
	}
	else
	{
		printf("CYCLES\n");
		for(int i=2;k&&i<=n;i++)
		{
			if(g[i].size()>1) continue;
			k--;
			x=v[i][0],y=v[i][1];
			if(x==dp[i][0]) x=v[i][2];
			if(y==dp[i][0]) y=v[i][2];
			z=lca(x,y);
			int d=l[x]+l[y]-2*l[z];
			if((d+2)%3)
			{
				//cout<<i<<" "<<x<<" "<<y<<" "<<z<<"\n";
				printf("%d\n%d ", d+2,i);
				while(x!=z)
					printf("%d ",x),x=dp[x][0];
				print(z,y);
			}
			else
			{
				z=lca(i,x);
				d=l[i]+l[x]-2*l[z];
				if((d+1)%3)
				{
					printf("%d\n",d+1);
					y=i;
					while(y!=z) printf("%d ", y),y=dp[y][0];
					print(z,x);
				}
				else
				{
					z=lca(i,y);
					d=l[i]+l[y]-2*l[z];
					printf("%d\n",d+1);
					assert((d+1)%3!=0);
					x=i;
					while(x!=z) printf("%d ", x),x=dp[x][0];
					print(z,y);
				}
			}
		}

	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define mod 1000000007
#define pb push_back
#define pi pair<ll,ll>
#define vi vector<ll>
#define vpi vector< pi >
const int N=300010;
vi v[N],g[N],w;
int a[N],l[N],dp[N][20];
int dfs(int x,int p=1)
{
	l[x]=l[p]+1;
	dp[x][0]=p;
	for(int i=1;i<20;i++)
		dp[x][i]=dp[dp[x][i-1]][i-1];
	a[x]=0;
	int r=0;
	for(int y:g[x])
	{
		if(y!=p)
		{
			int r1=dfs(y,x);
			if(r1>r)
				r=r1,a[x]=y;
		}
	}
	return r+1;
}
int lca(int x,int y)
{
	if(l[x]>l[y]) swap(x,y);
	for(int i=19;i>=0;i--)
	{
		if((l[y]-l[x])&(1<<i))
			y=dp[y][i];
	}
	if(x==y) return x;
	for(int i=19;i>=0;i--)
	{
		if(dp[x][i]!=dp[y][i])
			x=dp[x][i],y=dp[y][i];
	}
	return dp[x][0];
}
void print(int z,int y)
{
	w.clear();
	while(y!=z) w.pb(y),y=dp[y][0];
	w.pb(z);
	reverse(w.begin(), w.end());
	for(int y:w) printf("%d ", y);
	printf("\n");
}
bool vis[N];
void spanning(int x)
{
	vis[x]=1;
	for(int y:v[x]) if(!vis[y]) spanning(y),
		g[x].pb(y),g[y].pb(x);
}
int main()
{
	int n,m,k,x,y,z;
	cin>>n>>m>>k;
	while(m--)
	{
		scanf("%d %d",&x,&y);
		v[x].pb(y);
		v[y].pb(x);
	}
	spanning(1);
	y=dfs(1);
	if(y>=n/k)
	{
		x=1;
		printf("PATH\n%d\n",y);
		while(x) printf("%d ",x),x=a[x];
	}
	else
	{
		printf("CYCLES\n");
		for(int i=2;k&&i<=n;i++)
		{
			if(g[i].size()>1) continue;
			k--;
			x=v[i][0],y=v[i][1];
			if(x==dp[i][0]) x=v[i][2];
			if(y==dp[i][0]) y=v[i][2];
			z=lca(x,y);
			int d=l[x]+l[y]-2*l[z];
			if((d+2)%3)
			{
				//cout<<i<<" "<<x<<" "<<y<<" "<<z<<"\n";
				printf("%d\n%d ", d+2,i);
				while(x!=z)
					printf("%d ",x),x=dp[x][0];
				print(z,y);
			}
			else
			{
				z=lca(i,x);
				d=l[i]+l[x]-2*l[z];
				if((d+1)%3)
				{
					printf("%d\n",d+1);
					y=i;
					while(y!=z) printf("%d ", y),y=dp[y][0];
					print(z,x);
				}
				else
				{
					z=lca(i,y);
					d=l[i]+l[y]-2*l[z];
					printf("%d\n",d+1);
					//assert((d+1)%3!=0);
					x=i;
					while(x!=z) printf("%d ", x),x=dp[x][0];
					print(z,y);
				}
			}
		}

	}
	return 0;
}