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;
int n, m, k;
vector<pair<int, pair<int, int> > > X, Y;
vector<pair<int, int> > usedX, usedY;
int findX(int pos, int L) {
  int last = 0, total = 0, xb, xe;
  for (int i = 0; i < (int)X.size(); ++i) {
    if (X[i].first != pos) continue;
    xb = min(L, X[i].second.first);
    xe = min(L, X[i].second.second);
    total += max(0, xb - last);
    last = max(last, xe);
  }
  total += L - last;
  return total;
}
int findY(int pos, int L) {
  int last = 0, total = 0, yb, ye;
  for (int i = 0; i < (int)Y.size(); ++i) {
    if (Y[i].first != pos) continue;
    yb = min(L, Y[i].second.first);
    ye = min(L, Y[i].second.second);
    total += max(0, yb - last);
    last = max(last, ye);
  }
  total += L - last;
  return total;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; ++i) {
    int xb, yb, xe, ye;
    scanf("%d%d%d%d", &xb, &yb, &xe, &ye);
    if (xb == xe) {
      if (yb > ye) swap(yb, ye);
      X.push_back(make_pair(xb, make_pair(yb, ye)));
    } else {
      if (xb > xe) swap(xb, xe);
      Y.push_back(make_pair(yb, make_pair(xb, xe)));
    }
  }
  sort((X).begin(), (X).end());
  sort((Y).begin(), (Y).end());
  if (X.size() != 0) {
    int last = 0, now = X[0].first, total = 0;
    for (int i = 0; i < (int)X.size(); ++i) {
      if (X[i].first != now) {
        total += m - last;
        usedX.push_back(make_pair(now, total));
        last = total = 0;
        now = X[i].first;
      }
      total += max(0, X[i].second.first - last);
      last = max(last, X[i].second.second);
    }
    total += m - last;
    usedX.push_back(make_pair(now, total));
  }
  if (Y.size() != 0) {
    int last = 0, now = Y[0].first, total = 0;
    for (int i = 0; i < (int)Y.size(); ++i) {
      if (Y[i].first != now) {
        total += n - last;
        usedY.push_back(make_pair(now, total));
        last = total = 0;
        now = Y[i].first;
      }
      total += max(0, Y[i].second.first - last);
      last = max(last, Y[i].second.second);
    }
    total += n - last;
    usedY.push_back(make_pair(now, total));
  }
  int Grundy = 0;
  if ((n - 1 - (int)usedX.size()) % 2 != 0) Grundy = Grundy ^ m;
  if ((m - 1 - (int)usedY.size()) % 2 != 0) Grundy = Grundy ^ n;
  for (int i = 0; i < (int)usedX.size(); ++i) Grundy = Grundy ^ usedX[i].second;
  for (int i = 0; i < (int)usedY.size(); ++i) Grundy = Grundy ^ usedY[i].second;
  if (Grundy == 0) {
    puts("SECOND");
    return 0;
  }
  puts("FIRST");
  if ((int)usedX.size() < n - 1) {
    if (usedX.empty()) {
      usedX.push_back(make_pair(1, m));
    } else
      for (int i = 1; i <= n - 1; ++i)
        if (usedX[i - 1].first != i) {
          usedX.push_back(make_pair(i, m));
          break;
        }
  }
  for (int i = 0; i < (int)usedX.size(); ++i)
    if ((Grundy ^ usedX[i].second) <= usedX[i].second) {
      int target = usedX[i].second - (Grundy ^ usedX[i].second);
      int l = 0, r = m;
      while (l < r) {
        int mid = (l + r) / 2;
        int d = findX(usedX[i].first, mid);
        if (d == target) {
          l = r = mid;
          break;
        }
        if (d < target) {
          l = mid + 1;
        }
        if (d > target) {
          r = mid - 1;
        }
      }
      printf("%d 0 %d %d\n", usedX[i].first, usedX[i].first, l);
      return 0;
    }
  if ((int)usedY.size() < m - 1) {
    if (usedY.empty()) {
      usedY.push_back(make_pair(1, n));
    } else
      for (int i = 1; i <= m - 1; ++i)
        if (usedY[i - 1].first != i) {
          usedY.push_back(make_pair(i, n));
          break;
        }
  }
  for (int i = 0; i < (int)usedY.size(); ++i)
    if ((Grundy ^ usedY[i].second) <= usedY[i].second) {
      int target = usedY[i].second - (Grundy ^ usedY[i].second);
      int l = 0, r = n;
      while (l < r) {
        int mid = (l + r) / 2;
        int d = findY(usedY[i].first, mid);
        if (d == target) {
          l = r = mid;
          break;
        }
        if (d < target) {
          l = mid + 1;
        }
        if (d > target) {
          r = mid - 1;
        }
      }
      printf("0 %d %d %d\n", usedY[i].first, l, usedY[i].first);
      return 0;
    }
  return 0;
}