#include "testlib.h"
using namespace std;

int main(int argc, char* argv[]) {
    registerTestlibCmd(argc, argv);

    int T = inf.readInt();
    long long p = inf.readLong();

    // 跳过输入中的 T 组 A B C
    for (int i = 0; i < T; ++i) {
        inf.readInt();
        inf.readInt();
        inf.readInt();
    }

    // 整列判定
    bool col0_ok = true, col1_ok = true, col2_ok = true;

    for (int i = 0; i < T; ++i) {
        long long a0 = ans.readLong();
        long long a1 = ans.readLong();
        long long a2 = ans.readLong();

        long long o0 = ouf.readLong();
        long long o1 = ouf.readLong();
        long long o2 = ouf.readLong();

        if (o0 != a0) col0_ok = false;
        if (o1 != a1) col1_ok = false;
        if (o2 != a2) col2_ok = false;
    }

    // 分数范围 0 ~ 100
    double score = 0.0;
    if (col0_ok) score += 20.0;
    if (col1_ok) score += 40.0;
    if (col2_ok) score += 40.0;

    if (score >= 99.999) {
        quitf(_ok, "All correct.");
    }
    quitp(score, "Partial: type0=%s, type1=%s, type2=%s, score=%.2f",
          col0_ok ? "OK" : "WA",
          col1_ok ? "OK" : "WA",
          col2_ok ? "OK" : "WA",
          score);
}
