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:1073741824")
using namespace std;
const int nmax = 100100;
vector<pair<int, int> > seg[2][nmax];
vector<pair<int, int> > sg[2][nmax];
int val[2][nmax];
map<int, int> M[2];
map<int, int> f;
void upd(int i, int d) {
  for (; i < 1000000000 + 100; i |= i + 1) f[i] += d;
}
int sum(int r) {
  int res = 0;
  for (; r >= 0; r = (r & (r + 1)) - 1) res += f[r];
  return res;
}
int main() {
  int n, m, k;
  int x1, x2, y1, y2, x, y;
  int idx;
  scanf("%d%d%d", &n, &m, &k);
  for (int(i) = 0; (i) < (k); ++(i)) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 > x2) swap(x1, x2);
    if (y1 > y2) swap(y1, y2);
    if (x1 == x2) {
      x = x1;
      if (M[0].count(x)) {
        idx = M[0][x];
      } else {
        idx = (int((M[0]).size()));
        M[0][x] = idx;
      }
      val[0][idx] = x;
      seg[0][idx].push_back(make_pair((y1), (-1)));
      seg[0][idx].push_back(make_pair((y2), (+1)));
    } else {
      y = y1;
      if (M[1].count(y)) {
        idx = M[1][y];
      } else {
        idx = (int((M[1]).size()));
        M[1][y] = idx;
      }
      val[1][idx] = y;
      seg[1][idx].push_back(make_pair((x1), (-1)));
      seg[1][idx].push_back(make_pair((x2), (+1)));
    }
  }
  int count[2] = {(int((M[0]).size())), (int((M[1]).size()))};
  int xum = (((m - 1) & 1) * n) ^ (((n - 1) & 1) * m);
  for (int(t) = 0; (t) < (2); ++(t)) {
    for (int(i) = 0; (i) < (count[t]); ++(i)) {
      sort((seg[t][i]).begin(), (seg[t][i]).end());
      int l = -1000000000;
      int open = 0;
      int lenDel = 0;
      for (int(j) = 0; (j) < (int((seg[t][i]).size())); ++(j)) {
        if (open == 0) {
          l = seg[t][i][j].first;
        }
        open -= seg[t][i][j].second;
        if (open == 0) {
          sg[t][i].push_back(make_pair((l), (seg[t][i][j].first)));
          lenDel += seg[t][i][j].first - l;
        }
      }
      if (t == 0) {
        xum ^= m;
        xum ^= (m - lenDel);
      } else {
        xum ^= n;
        xum ^= (n - lenDel);
      }
    }
  }
  if (xum == 0) {
    printf("SECOND\n");
    return 0;
  } else {
    printf("FIRST\n");
    for (int(t) = 0; (t) < (2); ++(t)) {
      if (t == 0) {
        int rest = m;
        int needleft = rest ^ xum;
        int needdel = rest - needleft;
        if (count[t] < n - 1 && needleft < rest) {
          for (int i = 1;; ++i) {
            if (M[t].count(i) == 0) {
              printf("%d %d %d %d\n", i, 0, i, needdel);
              return 0;
            }
          }
        }
      } else {
        int rest = n;
        int needleft = rest ^ xum;
        int needdel = rest - needleft;
        if (count[t] < m - 1 && needleft < rest) {
          for (int i = 1;; ++i) {
            if (M[t].count(i) == 0) {
              printf("%d %d %d %d\n", 0, i, needdel, i);
              return 0;
            }
          }
        }
      }
      for (int(i) = 0; (i) < (count[t]); ++(i)) {
        int lenDel = 0;
        for (int(j) = 0; (j) < (int((sg[t][i]).size())); ++(j)) {
          lenDel += sg[t][i][j].second - sg[t][i][j].first;
        }
        int rest;
        if (t == 0) {
          rest = m - lenDel;
        } else {
          rest = n - lenDel;
        }
        int needleft = rest ^ xum;
        int needdel = rest - needleft;
        if (needleft < rest) {
          vector<pair<int, int> > res;
          res.push_back(make_pair((0), (sg[t][i][0].first)));
          for (int(j) = 0; (j) < (int((sg[t][i]).size())); ++(j))
            if (j != 0) {
              res.push_back(
                  make_pair((sg[t][i][j - 1].second), (sg[t][i][j].first)));
            }
          res.push_back(
              make_pair((sg[t][i].rbegin()[0].second), (t == 0 ? m : n)));
          int curlen = 0;
          int R = -1000000000;
          for (int(j) = 0; (j) < (int((res).size())); ++(j)) {
            if (curlen + (res[j].second - res[j].first) >= needdel) {
              R = res[j].first + (needdel - curlen);
              break;
            }
            curlen += res[j].second - res[j].first;
          }
          if (t == 0) {
            printf("%d %d %d %d\n", val[t][i], 0, val[t][i], R);
          } else {
            printf("%d %d %d %d\n", 0, val[t][i], R, val[t][i]);
          }
          return 0;
        }
      }
    }
  }
  return 0;
}