Problem: Two players play the following game. Initially, the players have a knife and a rectangular sheet of paper, divided into equal square grid cells of unit size. The players make moves in turn, the player who can't make a move loses. In one move, a player can take the knife and cut the paper along any segment of the grid line (not necessarily from border to border). The part of the paper, that touches the knife at least once, is considered cut. There is one limit not to turn the game into an infinite cycle: each move has to cut the paper, that is the knife has to touch the part of the paper that is not cut before.

Obviously, the game ends when the entire sheet is cut into 1 × 1 blocks. During the game, the pieces of the sheet are not allowed to move. It is also prohibited to cut along the border. The coordinates of the ends of each cut must be integers.

You are given an n × m piece of paper, somebody has already made k cuts there. Your task is to determine who will win if the players start to play on this sheet. You can consider that both players play optimally well. If the first player wins, you also need to find the winning first move.

Input

The first line contains three integers n, m, k (1 ≤ n, m ≤ 109, 0 ≤ k ≤ 105) — the sizes of the piece of paper and the number of cuts. Then follow k lines, each containing 4 integers xbi, ybi, xei, yei (0 ≤ xbi, xei ≤ n, 0 ≤ ybi, yei ≤ m) — the coordinates of the ends of the existing cuts. 

It is guaranteed that each cut has a non-zero length, is either vertical or horizontal and doesn't go along the sheet border.

The cuts may intersect, overlap and even be the same. That is, it is not guaranteed that the cuts were obtained during any correct game.

Output

If the second player wins, print "SECOND". Otherwise, in the first line print "FIRST", and in the second line print any winning move of the first player (the coordinates of the cut ends, follow input format to print them).

Examples

Input

2 1 0


Output

FIRST
1 0 1 1


Input

2 2 4
0 1 2 1
0 1 2 1
1 2 1 0
1 1 1 2


Output

SECOND

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10240000,10240000")
using namespace std;
const double R = 0.5772156649015328606065120900;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double eps = 1e-8;
const double pi = acos(-1.0);
struct point {
  int x, y;
  point(int x = 0, int y = 0) : x(x), y(y) {}
};
struct pp {
  int st, en;
  pp(int st = 0, int en = 0) : st(st), en(en) {}
  bool operator<(const pp& p) const {
    if (st == p.st) return en > p.en;
    return st < p.st;
  }
};
int ref1[N], ref2[N];
struct line {
  point st, en;
  line(point st = point(0, 0), point en = point(0, 0)) : st(st), en(en) {}
};
vector<pp> g1[N], g2[N], c;
pp nima[N];
line h[N], v[N];
bool cmp1(const line& l1, const line& l2) { return l1.st.y < l2.st.y; }
bool cmp2(const line& l1, const line& l2) { return l1.st.x < l2.st.x; }
int idh[N], idv[N], n, m;
int solve1(int n) {
  int id = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0 || h[i].st.x != h[i - 1].st.x) {
      ref1[id] = h[i].st.x;
      idh[i] = id++;
    } else
      idh[i] = idh[i - 1];
  }
  for (int i = 0; i < id; i++) {
    g1[i].clear();
  }
  for (int i = 0; i < n; i++) g1[idh[i]].push_back(pp(h[i].st.y, h[i].en.y));
  for (int i = 0; i < id; i++) {
    int st = 0, en;
    c.clear();
    sort(g1[i].begin(), g1[i].end());
    int re = g1[i].size(), pos = 0;
    while (pos < re) {
      en = g1[i][pos].st;
      if (st != en) c.push_back(pp(st, en));
      st = g1[i][pos].en;
      while (pos + 1 < re && g1[i][pos + 1].st <= st)
        st = max(st, g1[i][++pos].en);
      pos++;
      if (pos >= re) {
        if (st != m) c.push_back(pp(st, m));
      }
    }
    g1[i].clear();
    g1[i] = c;
  }
  return id;
}
int solve2(int nn) {
  int id = 0;
  for (int i = 0; i < nn; i++) {
    if (i == 0 || v[i].st.y != v[i - 1].st.y) {
      ref2[id] = v[i].st.y;
      idv[i] = id++;
    } else
      idv[i] = idv[i - 1];
  }
  for (int i = 0; i < id; i++) g2[i].clear();
  for (int i = 0; i < nn; i++) g2[idv[i]].push_back(pp(v[i].st.x, v[i].en.x));
  for (int i = 0; i < id; i++) {
    int st = 0, en;
    c.clear();
    sort(g2[i].begin(), g2[i].end());
    int re = g2[i].size(), pos = 0;
    while (pos < re) {
      en = g2[i][pos].st;
      if (st != en) c.push_back(pp(st, en));
      st = g2[i][pos].en;
      while (pos + 1 < re && g2[i][pos + 1].st <= st)
        st = max(st, g2[i][++pos].en);
      pos++;
      if (pos >= re) {
        if (st != n) c.push_back(pp(st, n));
      }
    }
    g2[i].clear();
    g2[i] = c;
  }
  return id;
}
int leng1[N], leng2[N];
int length(pp& x) { return x.en - x.st; }
int main() {
  int k;
  while (~scanf("%d%d%d", &n, &m, &k)) {
    int n1 = 0, n2 = 0;
    line tmp;
    for (int i = 0; i < k; i++) {
      scanf("%d%d%d%d", &tmp.st.x, &tmp.st.y, &tmp.en.x, &tmp.en.y);
      if (tmp.st.x == tmp.en.x) {
        if (tmp.st.y > tmp.en.y) swap(tmp.st.y, tmp.en.y);
        h[n1++] = tmp;
      } else {
        if (tmp.st.x > tmp.en.x) swap(tmp.st.x, tmp.en.x);
        v[n2++] = tmp;
      }
    }
    sort(h, h + n1, cmp2);
    int id1 = 1;
    n1 = solve1(n1);
    for (int i = 0; i < n1; i++) {
      if (ref1[i] != id1) break;
      id1++;
    }
    sort(v, v + n2, cmp1);
    int id2 = 1;
    n2 = solve2(n2);
    for (int i = 0; i < n2; i++) {
      if (ref2[i] != id2) break;
      id2++;
    }
    long long ans = 0;
    if ((n - 1 - n1) & 1) ans ^= m;
    for (int i = 0; i < n1; i++) {
      int re = g1[i].size();
      leng1[i] = 0;
      for (int j = 0; j < re; j++) {
        pp& tm = g1[i][j];
        int len = tm.en - tm.st;
        if (len == 0) continue;
        leng1[i] += len;
      }
      ans ^= leng1[i];
    }
    if ((m - 1 - n2) & 1) ans ^= n;
    for (int i = 0; i < n2; i++) {
      int re = g2[i].size();
      leng2[i] = 0;
      for (int j = 0; j < re; j++) {
        pp& tm = g2[i][j];
        leng2[i] += tm.en - tm.st;
      }
      ans ^= leng2[i];
    }
    if (ans == 0)
      puts("SECOND");
    else {
      puts("FIRST");
      bool fin = false;
      if ((n - 1 - n1) > 0) {
        if ((m ^ ans) < m) {
          fin = true;
          m -= m ^ ans;
          printf("%d %d %d %d\n", id1, 0, id1, m);
          return 0;
        }
      }
      if (!fin)
        for (int i = 0; i < n1; i++) {
          if ((leng1[i] ^ ans) >= leng1[i]) continue;
          int ned = leng1[i] - (leng1[i] ^ ans);
          fin = true;
          int pos = 0;
          int re = g1[i].size();
          for (int j = 0; j < re; j++) {
            if (g1[i][j].en != g1[i][j].st) nima[pos++] = g1[i][j];
          }
          sort(nima, nima + pos);
          int as = nima[0].st, ae;
          int wh = 0;
          while (ned - length(nima[wh]) > 0) ned -= length(nima[wh++]);
          ae = nima[wh].st + ned;
          printf("%d %d %d %d\n", ref1[i], as, ref1[i], ae);
          return 0;
        }
      if (!fin) {
        if ((m - 1 - n2) > 0) {
          if ((n ^ ans) < n) {
            fin = true;
            n -= n ^ ans;
            printf("%d %d %d %d\n", 0, id2, n, id2);
            return 0;
          }
        }
      }
      if (!fin)
        for (int i = 0; i < n2; i++) {
          if ((leng2[i] ^ ans) >= leng2[i]) continue;
          int ned = leng2[i] - (leng2[i] ^ ans);
          fin = true;
          int pos = 0;
          int re = g2[i].size();
          for (int j = 0; j < re; j++) {
            if (g2[i][j].en != g2[i][j].st) nima[pos++] = g2[i][j];
          }
          sort(nima, nima + pos);
          int as = nima[0].st, ae;
          int wh = 0;
          while (ned - length(nima[wh]) > 0) ned -= length(nima[wh++]);
          ae = nima[wh].st + ned;
          printf("%d %d %d %d\n", as, ref2[i], ae, ref2[i]);
          return 0;
        }
    }
  }
  return 0;
}