import java.io.*;
import java.util.*;

public class supreme_ak_wa_only_max_color {

    void solve() throws IOException {
        int n = in.nextInt();
        int m = in.nextInt();
        int[][] c = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                c[i][j] = in.nextInt();
            }
        }

        HashMap<Integer, Integer> freq = new HashMap<>();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                if (!freq.containsKey(c[i][j])) {
                    freq.put(c[i][j], 1);
                } else {
                    freq.put(c[i][j], freq.get(c[i][j]) + 1);
                }
            }
        }

        int color = -1;
        int mostCnt = -1;
        for (Map.Entry<Integer, Integer> e : freq.entrySet()) {
            if (e.getValue() > mostCnt) {
                color = e.getKey();
                mostCnt = e.getValue();
            }
        }

        int[] gR = new int[n];
        int[] gC = new int[m];
        int[][] tmpC = new int[n][];
        for (int i = 0; i < n; i++) {
            tmpC[i] = c[i].clone();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                if (tmpC[i][j] == color) {
                    gR[i]++;
                    gC[j]++;
                }
            }
        }
        ArrayList<Integer> ans = new ArrayList<Integer>();
        boolean changes = true;
        while (changes) {
            changes = false;
            for (int i = 0; i < n; i++) {
                if (m / 2 < gR[i] && gR[i] < m) {
                    ans.add(i + 1);
                    changes = true;
                    for (int j = 0; j < m; j++) {
                        if (tmpC[i][j] != color) {
                            tmpC[i][j] = color;
                            gC[j]++;
                            gR[i]++;
                        }
                    }
                }
            }
            for (int j = 0; j < m; j++) {
                if (n / 2 < gC[j] && gC[j] < n) {
                    ans.add(-(j + 1));
                    changes = true;
                    for (int i = 0; i < n; i++) {
                        if (tmpC[i][j] != color) {
                            tmpC[i][j] = color;
                            gC[j]++;
                            gR[i]++;
                        }
                    }
                }
            }
        }

        boolean all = true;
        for (int i = 0; i < n; i++) {
            all &= gR[i] == m;
        }
        if (all) {
            out.println(ans.size());
            for (int a : ans) {
                if (a > 0) {
                    out.println("R " + a);
                } else {
                    out.println("C " + (-a));
                }
            }
            return;
        }

        out.println("Poor Kazimir");
    }

    static MyScanner in;
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        in = new MyScanner(new FileReader("supreme.in"));
        out = new PrintWriter("supreme.out");
        new supreme_ak_wa_only_max_color().solve();
        out.close();
    }

    static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        MyScanner(Reader r) {
            br = new BufferedReader(r);
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
    }
}
