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;
const int dy[] = {-1, 0, 1, 0}, dx[] = {0, 1, 0, -1};
const double EPS = 1e-8;
const double PI = acos(-1.0);
int popcount(int n) { return __builtin_popcount(n); }
int popcount(long long n) { return __builtin_popcountll(n); }
template <class T>
int SIZE(T a) {
  return a.size();
}
template <class T>
string IntToString(T num) {
  string res;
  stringstream ss;
  ss << num;
  return ss.str();
}
template <class T>
T StringToInt(string str) {
  T res = 0;
  for (int i = 0; i < SIZE(str); i++) res = (res * 10 + str[i] - '0');
  return res;
}
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
void PrintSeq(T &a, int sz) {
  for (int i = 0; i < sz; i++) {
    cout << a[i];
    if (sz == i + 1)
      cout << endl;
    else
      cout << ' ';
  }
}
bool EQ(double a, double b) { return abs(a - b) < EPS; }
void fastStream() {
  cin.tie(0);
  std::ios_base::sync_with_stdio(0);
}
vector<string> split(string str, char del) {
  vector<string> res;
  for (int i = 0, s = 0; i < SIZE(str); i++) {
    if (str[i] == del) {
      if (i - s != 0) res.push_back(str.substr(s, i - s));
      s = i + 1;
    } else if (i == SIZE(str) - 1) {
      res.push_back(str.substr(s));
    }
  }
  return res;
}
int H, W, K;
map<int, vector<pair<pair<int, int>, int> > > initCuts[2];
set<int> usedSets[2];
int main() {
  cin >> H >> W >> K;
  for (int i = 0; i < K; i++) {
    int x1, x2, y1, y2;
    cin >> y1 >> x1 >> y2 >> x2;
    if (y1 == y2) {
      if (x1 > x2) swap(x1, x2);
      initCuts[0][y1].push_back(make_pair(pair<int, int>(x1, x2 - 1), 0));
      usedSets[0].insert(y1);
    } else {
      if (y1 > y2) swap(y1, y2);
      initCuts[1][x1].push_back(make_pair(pair<int, int>(y1, y2 - 1), 0));
      usedSets[1].insert(x1);
    }
  }
  for (int l = 0; l < 2; l++) {
    for (auto it = initCuts[l].begin(); it != initCuts[l].end(); it++) {
      vector<pair<pair<int, int>, int> > &v = it->second;
      sort(v.begin(), v.end());
      vector<pair<pair<int, int>, int> > nv;
      nv.push_back(v[0]);
      for (int i = 1; i < (int)v.size(); i++) {
        if (nv[(int)nv.size() - 1].first.second + 1 >= v[i].first.first)
          nv[(int)nv.size() - 1].first.second =
              max(nv[(int)nv.size() - 1].first.second, v[i].first.second);
        else
          nv.push_back(v[i]);
      }
      vector<pair<pair<int, int>, int> > nonCutPosSets;
      int prv = -1;
      for (int i = 0; i < (int)nv.size(); i++) {
        int len = nv[i].first.first - 1 - prv;
        if (nv[i].first.first - 1 >= 0) {
          nonCutPosSets.push_back(
              make_pair(pair<int, int>(prv + 1, nv[i].first.first - 1), len));
        }
        prv = nv[i].first.second;
      }
      if (l == 0) {
        if (prv != W - 1) {
          int len = W - 1 - prv;
          nonCutPosSets.push_back(
              make_pair(pair<int, int>(prv + 1, W - 1), len));
        }
      } else {
        if (prv != H - 1) {
          int len = H - 1 - prv;
          nonCutPosSets.push_back(
              make_pair(pair<int, int>(prv + 1, H - 1), len));
        }
      }
      v = nonCutPosSets;
    }
  }
  int empCutRow = (H - 1) - (int)initCuts[0].size();
  int empCutCol = (W - 1) - (int)initCuts[1].size();
  int empCutRowPos = -1;
  int empCutColPos = -1;
  for (int i = 1; i < H; i++) {
    if (usedSets[0].count(i) == 0) {
      empCutRowPos = i;
      break;
    }
  }
  for (int i = 1; i < W; i++) {
    if (usedSets[1].count(i) == 0) {
      empCutColPos = i;
      break;
    }
  }
  int ans = 0;
  if (empCutRow % 2) ans ^= W;
  if (empCutCol % 2) ans ^= H;
  for (int l = 0; l < 2; l++) {
    for (auto it = initCuts[l].begin(); it != initCuts[l].end(); it++) {
      vector<pair<pair<int, int>, int> > &v = it->second;
      int sum = 0;
      for (int i = 0; i < (int)v.size(); i++) {
        int len = v[i].second;
        sum += len;
      }
      ans ^= sum;
    }
  }
  if (ans == 0)
    cout << "SECOND" << endl;
  else {
    cout << "FIRST" << endl;
    if (empCutRow > 0) {
      int tmp = W;
      int org = W;
      tmp ^= ans;
      if (tmp < org) {
        int cnt = org - tmp;
        cout << empCutRowPos << " " << 0 << " " << empCutRowPos << " " << cnt
             << endl;
        return 0;
      }
    }
    if (empCutCol > 0) {
      int tmp = H;
      int org = H;
      tmp ^= ans;
      if (tmp < org) {
        int cnt = org - tmp;
        cout << 0 << " " << empCutColPos << " " << cnt << " " << empCutColPos
             << endl;
        return 0;
      }
    }
    {
      for (int l = 0; l < 2; l++) {
        for (auto it = initCuts[l].begin(); it != initCuts[l].end(); it++) {
          vector<pair<pair<int, int>, int> > &v = it->second;
          int sumLen = 0;
          for (int j = 0; j < (int)v.size(); j++) sumLen += v[j].second;
          int tmp = sumLen;
          int org = sumLen;
          tmp ^= ans;
          if (tmp < org) {
            int cnt = org - tmp;
            int nowSum = 0;
            int tail = 0;
            for (int j = 0; j < (int)v.size(); j++) {
              nowSum += v[j].second;
              if (nowSum >= cnt) {
                tail = v[j].first.first - 1 + (v[j].second - (nowSum - cnt));
                break;
              }
            }
            tail++;
            if (l == 0)
              cout << it->first << " " << 0 << " " << it->first << " " << tail
                   << endl;
            else
              cout << 0 << " " << it->first << " " << tail << " " << it->first
                   << endl;
            return 0;
          }
        }
      }
    }
  }
  return 0;
}