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;
template <class T, class... S>
void dbs(string str, T t, S... s) {
  int idx = str.find(',');
  cout << str.substr(0, idx) << " : " << t << ",";
  dbs(str.substr(idx + 1), s...);
}
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class S, class T>
ostream& operator<<(ostream& os, const map<S, T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
using namespace std;
void manage(vector<pair<int, int> >& ranges) {
  if (ranges.empty()) {
    return;
  }
  vector<pair<int, int> > ret;
  sort(ranges.begin(), ranges.end());
  int curL = ranges[0].first, curR = ranges[0].second;
  for (int i = 1; i < ranges.size(); i++) {
    pair<int, int> now = ranges[i];
    if (curR >= now.first) {
      curR = max(now.second, curR);
    } else {
      ret.push_back({curL, curR});
      curL = ranges[i].first, curR = ranges[i].second;
    }
  }
  ret.push_back({curL, curR});
  ranges = ret;
}
vector<vector<pair<int, int> > > intV, intH;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int N, M, K;
  cin >> N >> M >> K;
  set<int> huhx, huhy;
  vector<pair<int, pair<int, int> > > cutV, cutH;
  for (int i = 0; i < K; i++) {
    int x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if (x1 > x2) swap(x1, x2);
    if (y1 > y2) swap(y1, y2);
    if (x1 < x2) cutV.push_back({y1, {x1, x2}}), huhy.insert(y1);
    if (y1 < y2) cutH.push_back({x1, {y1, y2}}), huhx.insert(x1);
  }
  map<int, int> compx, compy, icx, icy;
  int cnt = 0;
  for (int i : huhx) {
    compx[i] = cnt;
    icx[cnt] = i;
    cnt++;
  }
  intH.resize(cnt);
  cnt = 0;
  for (int i : huhy) {
    compy[i] = cnt;
    icy[cnt] = i;
    cnt++;
  }
  intV.resize(cnt);
  for (auto u : cutV) {
    intV[compy[u.first]].push_back(u.second);
  }
  for (auto u : cutH) {
    intH[compx[u.first]].push_back(u.second);
  }
  for (auto& u : intV) {
    manage(u);
  }
  for (auto& u : intH) {
    manage(u);
  }
  int gr = 0;
  if ((N - huhx.size()) % 2 == 0) {
    gr ^= M;
  }
  if ((M - huhy.size()) % 2 == 0) {
    gr ^= N;
  }
  vector<int> fucx, fucy;
  for (int i = 0; i < intH.size(); i++) {
    int xc = icx[i];
    int lc = 0;
    int xx = 0;
    for (auto u : intH[i]) {
      if (lc < u.first) {
        xx += u.first - lc;
      }
      lc = u.second;
    }
    if (lc < M) {
      xx += M - lc;
    }
    fucx.push_back(xx);
    gr ^= xx;
  }
  for (int i = 0; i < intV.size(); i++) {
    int yc = icy[i];
    int lc = 0;
    int xx = 0;
    for (auto u : intV[i]) {
      if (lc < u.first) {
        xx += u.first - lc;
      }
      lc = u.second;
    }
    if (lc < N) {
      xx += N - lc;
    }
    fucy.push_back(xx);
    gr ^= xx;
  }
  int vx = -1;
  for (int i = 1; i < N; i++) {
    if (huhx.find(i) == huhx.end()) {
      vx = i;
      break;
    }
  }
  int vy = -1;
  for (int i = 1; i < M; i++) {
    if (huhy.find(i) == huhy.end()) {
      vy = i;
      break;
    }
  }
  vector<pair<int, pair<int, int> > > horz, verts;
  if (vx != -1) {
    horz.push_back({vx, {0, M}});
  }
  if (vy != -1) {
    verts.push_back({vy, {0, N}});
  }
  if (gr == 0) {
    cout << "SECOND";
  } else {
    cout << "FIRST\n";
    if (verts.size() && (N ^ gr) < N) {
      cout << 0 << ' ' << vy << ' ' << N - (N ^ gr) << ' ' << vy << endl;
      return 0;
    }
    if (horz.size() && (M ^ gr) < M) {
      cout << vx << ' ' << 0 << ' ' << vx << ' ' << M - (M ^ gr) << endl;
      return 0;
    }
    for (int i = 0; i < huhx.size(); i++) {
      if ((fucx[i] ^ gr) > fucx[i]) {
        continue;
      }
      int xx = icx[i];
      int req = fucx[i] - (fucx[i] ^ gr);
      int st = 0, del = 0;
      intH[i].push_back({M, M});
      for (int j = 0; j < intH[i].size(); j++) {
        if (st - del >= req) {
          st = del + req;
          break;
        }
        st = intH[i][j].first;
        if (j) {
          del += intH[i][j - 1].second - intH[i][j - 1].first;
        }
      }
      if (st - del >= req) {
        st = del + req;
      }
      cout << xx << ' ' << 0 << ' ' << xx << ' ' << st << endl;
      return 0;
      ;
    }
    for (int i = 0; i < huhy.size(); i++) {
      if ((fucy[i] ^ gr) > fucy[i]) {
        continue;
      }
      int xx = icy[i];
      int req = fucy[i] - (fucy[i] ^ gr);
      int st = 0, del = 0;
      intV[i].push_back({N, N});
      for (int j = 0; j < intV[i].size(); j++) {
        if (st - del >= req) {
          st = del + req;
          break;
        }
        st = intV[i][j].first;
        if (j) {
          del += intV[i][j - 1].second - intV[i][j - 1].first;
        }
      }
      if (st - del >= req) {
        st = del + req;
      }
      cout << 0 << ' ' << xx << ' ' << st << ' ' << xx << endl;
      return 0;
      ;
    }
  }
  return 0;
}