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>
using namespace std;
struct node {
  int x, yb, ye;
  bool operator<(node b) const {
    return ((x < b.x) || ((x == b.x) && (yb < b.yb)));
  }
} Cut[2][100000];
int CutNum[2];
class Solution {
 public:
  int NimSum(node Cut[], int CutNum, int n, int m) {
    int ans = 0;
    int tot = 0, h = 0;
    while (h < CutNum) {
      int sum = m, b = Cut[h].yb, e = Cut[h].ye;
      while ((h + 1 < CutNum) && (Cut[h + 1].x == Cut[h].x)) {
        if (Cut[h + 1].yb <= e)
          e = max(Cut[++h].ye, e);
        else {
          sum -= e - b;
          b = Cut[++h].yb;
          e = Cut[h].ye;
        }
      }
      sum -= e - b;
      ans ^= sum;
      tot++;
      h++;
    }
    if (((n - tot) & 1) == 0) ans ^= m;
    return ans;
  }
  void Print(int x, int yb, int ye, int type) {
    if (type == 0)
      printf("%d %d %d %d", x, yb, x, ye);
    else
      printf("%d %d %d %d", yb, x, ye, x);
  }
  bool GetCut(node Cut[], int CutNum, int n, int m, int type, int Sum) {
    int ans = 0;
    int tot = 0, h = 0;
    int j = 1;
    if (CutNum > 0) {
      if (Cut[0].x > 1) {
        if ((Sum ^ m) <= m) {
          Print(1, 0, m - (Sum ^ m), type);
          return true;
        }
      }
      if (Cut[CutNum - 1].x < n - 1) {
        if ((Sum ^ m) <= m) {
          Print(n - 1, 0, m - (Sum ^ m), type);
          return true;
        }
      }
    } else if (n > 1) {
      if ((Sum ^ m) <= m) {
        Print(1, 0, m - (Sum ^ m), type);
        return true;
      }
    }
    while (h < CutNum) {
      int sum = Cut[h].yb, b = Cut[h].yb, e = Cut[h].ye, hh = h;
      if ((h > 0) && (Cut[h - 1].x + 1 < Cut[h].x)) {
        if ((Sum ^ m) <= m) {
          Print(Cut[h - 1].x + 1, 0, m - (Sum ^ m), type);
          return true;
        }
      }
      while ((h + 1 < CutNum) && (Cut[h + 1].x == Cut[h].x)) {
        if (Cut[h + 1].yb <= e)
          e = max(Cut[++h].ye, e);
        else {
          sum += Cut[h + 1].yb - e;
          b = Cut[++h].yb;
          e = Cut[h].ye;
        }
      }
      sum += m - e;
      if ((Sum ^ sum) <= sum) {
        h = hh;
        Sum = (sum - (Sum ^ sum));
        sum = Cut[h].yb, b = Cut[h].yb, e = Cut[h].ye;
        if (sum >= Sum) {
          Print(Cut[h].x, 0, Sum, type);
          return true;
        }
        if ((h > 0) && (Cut[h - 1].x + 1 < Cut[h].x)) {
          Print(Cut[h - 1].x, 0, Sum, type);
          return true;
        }
        while ((h + 1 < CutNum) && (Cut[h + 1].x == Cut[h].x)) {
          if (Cut[h + 1].yb <= e)
            e = max(Cut[++h].ye, e);
          else {
            if (sum + Cut[h + 1].yb - e >= Sum) {
              Print(Cut[h].x, 0, Sum - sum + e, type);
              return true;
            }
            sum += Cut[h + 1].yb - e;
            b = Cut[++h].yb;
            e = Cut[h].ye;
          }
        }
        if (sum + m - e >= Sum) {
          Print(Cut[h].x, 0, Sum - sum + e, type);
          return true;
        }
      }
      h++;
    }
    return false;
  }
};
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  CutNum[0] = CutNum[1] = 0;
  for (int i = 0; i < k; i++) {
    int xb, xe, yb, ye;
    scanf("%d%d%d%d", &xb, &yb, &xe, &ye);
    if (xb == xe) {
      Cut[0][CutNum[0]].x = xb;
      Cut[0][CutNum[0]].yb = min(yb, ye);
      Cut[0][CutNum[0]++].ye = max(yb, ye);
    } else {
      Cut[1][CutNum[1]].x = yb;
      Cut[1][CutNum[1]].yb = min(xb, xe);
      Cut[1][CutNum[1]++].ye = max(xb, xe);
    }
  }
  sort(Cut[0], Cut[0] + CutNum[0]);
  sort(Cut[1], Cut[1] + CutNum[1]);
  Solution ans;
  int result =
      ans.NimSum(Cut[0], CutNum[0], n, m) ^ ans.NimSum(Cut[1], CutNum[1], m, n);
  if (result == 0)
    printf("SECOND\n");
  else {
    printf("FIRST\n");
    if (!ans.GetCut(Cut[0], CutNum[0], n, m, 0, result))
      ans.GetCut(Cut[1], CutNum[1], m, n, 1, result);
  }
  return 0;
}