#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <ctime>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <assert.h>
#include <map>
#include <queue>
#include <cstring>
#include <set>
using namespace std;

typedef unsigned long long int ull;
typedef long long int ll;
#define vi vector<int>
#define vvi vector< vector<int> >
#define vd vector<double>
#define vb vector<bool>
#define vs vector<string>
#define pi pair<int,int>
#define pb push_back
#define out(a) cout<<(a)<<endl
#define pout(a,b) cout<<(a)<<' '<<(b)<<endl
#define sz(c) (int)(c).size()
#define foreach(n,i) for(int (i)=0;(i)<(n);(i)++)
#define range(s,e,i) for(int (i)=(s);(i)<=(e);(i)++)
#define all(c) (c).begin(),(c).end()
template<typename typ> void vout(vector<typ>& v){for(int vint=0;vint<sz(v);vint++)cout<<(v)[vint]<<' ';cout<<endl;}
template<typename typ> void arrout(typ* arr,int l){for(int i=0;i<l;i++)cout<<arr[i]<<' ';cout<<endl;}

#define debug
#ifdef debug
#define dbg(a) cout << #a << ' ' << a << endl
#endif
#ifndef debug
#define dbg(a)
#endif

#define bit(n,i) ( ((n) >> (i)) & 1 )

inline int min(const int a,const int b)
{
    return (a < b ? a : b);
}

inline int max(const int a,const int b)
{
    return (a > b ? a : b);
}
typedef map<int, vector< pi > > nMap;
int main()
{
    int n,m;
    cin >> n >> m;
    int k;
    cin >> k;
    nMap xMap,yMap;
    int x1,x2,y1,y2;
    for(int i = 0 ; i < k ; ++i)
    {
        cin >> x1 >> y1 >> x2 >> y2;
        if( x1 == x2 && x1 != 0 && x1 != n )
        {
            nMap::iterator iter = xMap.find(x1);
            if( iter == xMap.end() )
                xMap[x1] = vector< pi >(1, pi(min(y1,y2), max(y1,y2)) );
            else
                xMap[x1].pb( pi(min(y1,y2), max(y1,y2)) );
        }
        if( y1 == y2 && y1 != 0 && y1 != m )
        {
            nMap::iterator iter = yMap.find(y1);
            if( iter == yMap.end() )
                yMap[y1] = vector< pi >(1, pi(min(x1,x2), max(x1,x2)) );
            else
                yMap[y1].pb( pi(min(x1,x2), max(x1,x2)) );
        }
    }
    int count = 0;
    int mx = 0,pt = -1;
    bool xy;
    int Xor = 0;
    int last = 0, uncut = -1;
    vi piles;
    for(nMap::iterator iter = xMap.begin() ; iter != xMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        // for(int i = 0 ; i < sz(intervals) ; ++i)
        //     cout << intervals[i].first << ' ' << intervals[i].second << endl;
        sort( all(intervals) );
        int total = m;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        // cout << (*iter).first << ' ' << total << endl;
        if( total > mx )
        {
            mx = total;
            xy = false;
            pt = (*iter).first;
        }
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(0);piles.pb((*iter).first);
    }
    if( (n - 1 - count) % 2 )
        Xor ^= m;
    if( count != n - 1 )
    {
        mx = m;
        xy = false;
        if( uncut >= 0 )
            pt = uncut;
        else
            pt = n - 1;
        piles.pb(m);piles.pb(0);
        if( uncut >= 0 )
            piles.pb(uncut);
        else
            piles.pb(n-1);
    }
    last = 0, uncut = -1;
    count = 0;
    for(nMap::iterator iter = yMap.begin() ; iter != yMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        sort( all(intervals) );
        int total = n;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        // cout << (*iter).first << ' ' << total << endl;
        Xor ^= total;
        if( total > mx )
        {
            mx = total;
            xy = true;
            pt = (*iter).first;
        }
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(1);piles.pb((*iter).first);
    }
    if( (m - 1 - count) % 2 )
        Xor ^= n;
    if( count != m - 1 )
    {
        if( n > mx )
        {
            mx = n;
            xy = true;
            if( uncut >= 0 )
                pt = uncut;
            else
                pt = m - 1;
            piles.pb(n);piles.pb(1);
            if( uncut >= 0 )
                piles.pb(uncut);
            else
                piles.pb(m-1);
        }
    }
    if( Xor )
    {
        out("FIRST");
        int bi = 0;
        for(int b = 30 ; b >= 0 ; --b)
        {
            if( bit(Xor,b) )
            {
                bi = b;
                break;
            }
        }
        for(int i = 0 ; i < sz(piles) ; i+= 3)
        {
            if( bit(piles[i],bi) )
            {
                mx = piles[i];
                xy = piles[i+1];
                pt = piles[i+2];
                break;
            }
        }
        int ans = mx;
        for(int b = bi ; b >= 0 ; --b)
        {
            if( bit(Xor,b) )
            {
                if( bit(mx,b) )
                    ans &= ~( (1<<b) );
                else
                    ans |= (1 << b);
            }
        }
        ans = mx - ans;
        if( !xy )
        {
            if( xMap.find(pt) == xMap.end() )
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            else
            {
                vector< pi > intervals = xMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            }
        }
        else
        {
            if( yMap.find(pt) == yMap.end() )
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            else
            {
                vector< pi > intervals = yMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            }
        }
    }
    else
        out("SECOND");
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <ctime>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <assert.h>
#include <map>
#include <queue>
#include <cstring>
#include <set>
using namespace std;

typedef unsigned long long int ull;
typedef long long int ll;
#define vi vector<int>
#define vvi vector< vector<int> >
#define vd vector<double>
#define vb vector<bool>
#define vs vector<string>
#define pi pair<int,int>
#define pb push_back
#define out(a) cout<<(a)<<endl
#define pout(a,b) cout<<(a)<<' '<<(b)<<endl
#define sz(c) (int)(c).size()
#define foreach(n,i) for(int (i)=0;(i)<(n);(i)++)
#define range(s,e,i) for(int (i)=(s);(i)<=(e);(i)++)
#define all(c) (c).begin(),(c).end()
template<typename typ> void vout(vector<typ>& v){for(int vint=0;vint<sz(v);vint++)cout<<(v)[vint]<<' ';cout<<endl;}
template<typename typ> void arrout(typ* arr,int l){for(int i=0;i<l;i++)cout<<arr[i]<<' ';cout<<endl;}

#define debug
#ifdef debug
#define dbg(a) cout << #a << ' ' << a << endl
#endif
#ifndef debug
#define dbg(a)
#endif

inline int min(const int a,const int b)
{
    return (a < b ? a : b);
}

inline int max(const int a,const int b)
{
    return (a > b ? a : b);
}
typedef map<int, vector< pi > > nMap;
int main()
{
    int n,m;
    cin >> n >> m;
    int k;
    cin >> k;
    nMap xMap,yMap;
    int x1,x2,y1,y2;
    for(int i = 0 ; i < k ; ++i)
    {
        cin >> x1 >> y1 >> x2 >> y2;
        if( x1 == x2 && x1 != 0 && x1 != n )
        {
            nMap::iterator iter = xMap.find(x1);
            if( iter == xMap.end() )
                xMap[x1] = vector< pi >(1, pi(min(y1,y2), max(y1,y2)) );
            else
                xMap[x1].pb( pi(min(y1,y2), max(y1,y2)) );
        }
        if( y1 == y2 && y1 != 0 && y1 != m )
        {
            nMap::iterator iter = yMap.find(y1);
            if( iter == yMap.end() )
                yMap[y1] = vector< pi >(1, pi(min(x1,x2), max(x1,x2)) );
            else
                yMap[y1].pb( pi(min(x1,x2), max(x1,x2)) );
        }
    }
    int count = 0;
    int mx = 0,pt = -1;
    bool xy;
    int Xor = 0;
    int last = 0, uncut = -1;
    for(nMap::iterator iter = xMap.begin() ; iter != xMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        // for(int i = 0 ; i < sz(intervals) ; ++i)
        //     cout << intervals[i].first << ' ' << intervals[i].second << endl;
        sort( all(intervals) );
        int total = m;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        // cout << (*iter).first << ' ' << total << endl;
        if( total > mx )
        {
            mx = total;
            xy = false;
            pt = (*iter).first;
        }
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
    }
    if( (n - 1 - count) % 2 )
        Xor ^= m;
    if( count != n - 1 )
    {
        mx = m;
        xy = false;
        if( uncut >= 0 )
            pt = uncut;
        else
            pt = n - 1;
    }
    last = 0, uncut = -1;
    count = 0;
    for(nMap::iterator iter = yMap.begin() ; iter != yMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        sort( all(intervals) );
        int total = n;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        // cout << (*iter).first << ' ' << total << endl;
        Xor ^= total;
        if( total > mx )
        {
            mx = total;
            xy = true;
            pt = (*iter).first;
        }
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
    }
    if( (m - 1 - count) % 2 )
        Xor ^= n;
    if( count != m - 1 )
    {
        if( n > mx )
        {
            mx = n+1;
            xy = true;
            if( uncut >= 0 )
                pt = uncut;
            else
                pt = m - 1;
        }
    }
    if( Xor )
    {
        out("FIRST");
        int ans = mx - (Xor ^ mx);
        if( !xy )
        {
            if( xMap.find(pt) == xMap.end() )
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            else
            {
                vector< pi > intervals = xMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            }
        }
        else
        {
            if( yMap.find(pt) == yMap.end() )
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            else
            {
                vector< pi > intervals = yMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            }
        }
    }
    else
        out("SECOND");
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <ctime>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <assert.h>
#include <map>
#include <queue>
#include <cstring>
#include <set>
using namespace std;

typedef unsigned long long int ull;
typedef long long int ll;
#define vi vector<int>
#define vvi vector< vector<int> >
#define vd vector<double>
#define vb vector<bool>
#define vs vector<string>
#define pi pair<int,int>
#define pb push_back
#define out(a) cout<<(a)<<endl
#define pout(a,b) cout<<(a)<<' '<<(b)<<endl
#define sz(c) (int)(c).size()
#define foreach(n,i) for(int (i)=0;(i)<(n);(i)++)
#define range(s,e,i) for(int (i)=(s);(i)<=(e);(i)++)
#define all(c) (c).begin(),(c).end()
template<typename typ> void vout(vector<typ>& v){for(int vint=0;vint<sz(v);vint++)cout<<(v)[vint]<<' ';cout<<endl;}
template<typename typ> void arrout(typ* arr,int l){for(int i=0;i<l;i++)cout<<arr[i]<<' ';cout<<endl;}

#define debug
#ifdef debug
#define dbg(a) cout << #a << ' ' << a << endl
#endif
#ifndef debug
#define dbg(a)
#endif

#define bit(n,i) ( ((n) >> (i)) & 1 )

inline int min(const int a,const int b)
{
    return (a < b ? a : b);
}

inline int max(const int a,const int b)
{
    return (a > b ? a : b);
}
typedef map<int, vector< pi > > nMap;
int main()
{
    int n,m;
    cin >> n >> m;
    int k;
    cin >> k;
    nMap xMap,yMap;
    int x1,x2,y1,y2;
    for(int i = 0 ; i < k ; ++i)
    {
        cin >> x1 >> y1 >> x2 >> y2;
        if( x1 == x2 && x1 != 0 && x1 != n )
        {
            nMap::iterator iter = xMap.find(x1);
            if( iter == xMap.end() )
                xMap[x1] = vector< pi >(1, pi(min(y1,y2), max(y1,y2)) );
            else
                xMap[x1].pb( pi(min(y1,y2), max(y1,y2)) );
        }
        if( y1 == y2 && y1 != 0 && y1 != m )
        {
            nMap::iterator iter = yMap.find(y1);
            if( iter == yMap.end() )
                yMap[y1] = vector< pi >(1, pi(min(x1,x2), max(x1,x2)) );
            else
                yMap[y1].pb( pi(min(x1,x2), max(x1,x2)) );
        }
    }
    int count = 0;
    int mx = 0,pt = -1;
    bool xy;
    int Xor = 0;
    int last = 0, uncut = -1;
    vi piles;
    for(nMap::iterator iter = xMap.begin() ; iter != xMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        // for(int i = 0 ; i < sz(intervals) ; ++i)
        //     cout << intervals[i].first << ' ' << intervals[i].second << endl;
        sort( all(intervals) );
        int total = m;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        // cout << (*iter).first << ' ' << total << endl;
        if( total > mx )
        {
            mx = total;
            xy = false;
            pt = (*iter).first;
        }
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(0);piles.pb((*iter).first);
    }
    if( (n - 1 - count) % 2 )
        Xor ^= m;
    if( count != n - 1 )
    {
        mx = m;
        xy = false;
        if( uncut >= 0 )
            pt = uncut;
        else
            pt = n - 1;
        piles.pb(m);piles.pb(0);
        if( uncut >= 0 )
            piles.pb(uncut);
        else
            piles.pb(n-1);
    }
    last = 0, uncut = -1;
    count = 0;
    for(nMap::iterator iter = yMap.begin() ; iter != yMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        sort( all(intervals) );
        int total = n;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        // cout << (*iter).first << ' ' << total << endl;
        Xor ^= total;
        if( total > mx )
        {
            mx = total;
            xy = true;
            pt = (*iter).first;
        }
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(1);piles.pb((*iter).first);
    }
    if( (m - 1 - count) % 2 )
        Xor ^= n;
    if( count != m - 1 )
    {
        if( n > mx )
        {
            mx = n;
            xy = true;
            if( uncut >= 0 )
                pt = uncut;
            else
                pt = m - 1;
            piles.pb(n);piles.pb(1);
            if( uncut >= 0 )
                piles.pb(uncut);
            else
                piles.pb(m-1);
        }
    }
    if( Xor )
    {
        out("FIRST");
        int bi = 0;
        for(int b = 30 ; b >= 0 ; --b)
        {
            if( bit(Xor,b) )
                bi = b;
        }
        for(int i = 0 ; i < sz(piles) ; i+= 3)
        {
            if( bit(piles[i],bi) )
            {
                mx = piles[i];
                xy = piles[i+1];
                pt = piles[i+2];
                break;
            }
        }
        int ans = mx;
        for(int b = bi ; b >= 0 ; --b)
        {
            if( bit(Xor,b) )
            {
                if( bit(mx,b) )
                    ans &= ~( (1<<b) );
                else
                    ans |= (1 << b);
            }
        }
        ans = mx - ans;
        if( !xy )
        {
            if( xMap.find(pt) == xMap.end() )
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            else
            {
                vector< pi > intervals = xMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            }
        }
        else
        {
            if( yMap.find(pt) == yMap.end() )
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            else
            {
                vector< pi > intervals = yMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            }
        }
    }
    else
        out("SECOND");
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <ctime>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <assert.h>
#include <map>
#include <queue>
#include <cstring>
#include <set>
using namespace std;

typedef unsigned long long int ull;
typedef long long int ll;
#define vi vector<int>
#define vvi vector< vector<int> >
#define vd vector<double>
#define vb vector<bool>
#define vs vector<string>
#define pi pair<int,int>
#define pb push_back
#define out(a) cout<<(a)<<endl
#define pout(a,b) cout<<(a)<<' '<<(b)<<endl
#define sz(c) (int)(c).size()
#define foreach(n,i) for(int (i)=0;(i)<(n);(i)++)
#define range(s,e,i) for(int (i)=(s);(i)<=(e);(i)++)
#define all(c) (c).begin(),(c).end()
template<typename typ> void vout(vector<typ>& v){for(int vint=0;vint<sz(v);vint++)cout<<(v)[vint]<<' ';cout<<endl;}
template<typename typ> void arrout(typ* arr,int l){for(int i=0;i<l;i++)cout<<arr[i]<<' ';cout<<endl;}

#define debug
#ifdef debug
#define dbg(a) cout << #a << ' ' << a << endl
#endif
#ifndef debug
#define dbg(a)
#endif

#define bit(n,i) ( ((n) >> (i)) & 1 )

inline int min(const int a,const int b)
{
    return (a < b ? a : b);
}

inline int max(const int a,const int b)
{
    return (a > b ? a : b);
}
typedef map<int, vector< pi > > nMap;
int main()
{
    int n,m;
    cin >> n >> m;
    int k;
    cin >> k;
    nMap xMap,yMap;
    int x1,x2,y1,y2;
    for(int i = 0 ; i < k ; ++i)
    {
        cin >> x1 >> y1 >> x2 >> y2;
        if( x1 == x2 && x1 != 0 && x1 != n )
        {
            nMap::iterator iter = xMap.find(x1);
            if( iter == xMap.end() )
                xMap[x1] = vector< pi >(1, pi(min(y1,y2), max(y1,y2)) );
            else
                xMap[x1].pb( pi(min(y1,y2), max(y1,y2)) );
        }
        if( y1 == y2 && y1 != 0 && y1 != m )
        {
            nMap::iterator iter = yMap.find(y1);
            if( iter == yMap.end() )
                yMap[y1] = vector< pi >(1, pi(min(x1,x2), max(x1,x2)) );
            else
                yMap[y1].pb( pi(min(x1,x2), max(x1,x2)) );
        }
    }
    int count = 0;
    int mx = 0,pt = -1;
    bool xy;
    int Xor = 0;
    int last = 0, uncut = -1;
    vi piles;
    for(nMap::iterator iter = xMap.begin() ; iter != xMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        // for(int i = 0 ; i < sz(intervals) ; ++i)
        //     cout << intervals[i].first << ' ' << intervals[i].second << endl;
        sort( all(intervals) );
        int total = m;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(0);piles.pb((*iter).first);
    }
    if( (n - 1 - count) % 2 )
        Xor ^= m;
    if( count != n - 1 )
    {
        piles.pb(m);piles.pb(0);
        if( uncut >= 0 )
            piles.pb(uncut);
        else
            piles.pb(n-1);
    }
    last = 0, uncut = -1;
    count = 0;
    for(nMap::iterator iter = yMap.begin() ; iter != yMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        sort( all(intervals) );
        int total = n;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(1);piles.pb((*iter).first);
    }
    if( (m - 1 - count) % 2 )
        Xor ^= n;
    if( count != m - 1 )
    {
        piles.pb(n);piles.pb(1);
        if( uncut >= 0 )
            piles.pb(uncut);
        else
            piles.pb(m-1);
    }
    if( Xor )
    {
        out("FIRST");
        int bi = 0;
        for(int b = 30 ; b >= 0 ; --b)
        {
            if( bit(Xor,b) )
            {
                bi = b;
                break;
            }
        }
        for(int i = 0 ; i < sz(piles) ; i+= 3)
        {
            if( bit(piles[i],bi) )
            {
                mx = piles[i];
                xy = piles[i+1];
                pt = piles[i+2];
                break;
            }
        }
        int ans = mx - (mx ^ Xor);
        if( !xy )
        {
            if( xMap.find(pt) == xMap.end() )
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            else
            {
                vector< pi > intervals = xMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        if( ans > inter.first )
                            ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                if( ans > inter.first )
                    ans += inter.second - inter.first;
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            }
        }
        else
        {
            if( yMap.find(pt) == yMap.end() )
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            else
            {
                vector< pi > intervals = yMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        if( ans > inter.first )
                            ans += min(inter.second, ans) - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                if( ans > inter.first )
                    ans += inter.second - inter.first;
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            }
        }
    }
    else
        out("SECOND");
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <ctime>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <assert.h>
#include <map>
#include <queue>
#include <cstring>
#include <set>
using namespace std;

typedef unsigned long long int ull;
typedef long long int ll;
#define vi vector<int>
#define vvi vector< vector<int> >
#define vd vector<double>
#define vb vector<bool>
#define vs vector<string>
#define pi pair<int,int>
#define pb push_back
#define out(a) cout<<(a)<<endl
#define pout(a,b) cout<<(a)<<' '<<(b)<<endl
#define sz(c) (int)(c).size()
#define foreach(n,i) for(int (i)=0;(i)<(n);(i)++)
#define range(s,e,i) for(int (i)=(s);(i)<=(e);(i)++)
#define all(c) (c).begin(),(c).end()
template<typename typ> void vout(vector<typ>& v){for(int vint=0;vint<sz(v);vint++)cout<<(v)[vint]<<' ';cout<<endl;}
template<typename typ> void arrout(typ* arr,int l){for(int i=0;i<l;i++)cout<<arr[i]<<' ';cout<<endl;}

#define debug
#ifdef debug
#define dbg(a) cout << #a << ' ' << a << endl
#endif
#ifndef debug
#define dbg(a)
#endif

#define bit(n,i) ( ((n) >> (i)) & 1 )

inline int min(const int a,const int b)
{
    return (a < b ? a : b);
}

inline int max(const int a,const int b)
{
    return (a > b ? a : b);
}
typedef map<int, vector< pi > > nMap;
int main()
{
    int n,m;
    cin >> n >> m;
    int k;
    cin >> k;
    nMap xMap,yMap;
    int x1,x2,y1,y2;
    for(int i = 0 ; i < k ; ++i)
    {
        cin >> x1 >> y1 >> x2 >> y2;
        if( x1 == x2 && x1 != 0 && x1 != n )
        {
            nMap::iterator iter = xMap.find(x1);
            if( iter == xMap.end() )
                xMap[x1] = vector< pi >(1, pi(min(y1,y2), max(y1,y2)) );
            else
                xMap[x1].pb( pi(min(y1,y2), max(y1,y2)) );
        }
        if( y1 == y2 && y1 != 0 && y1 != m )
        {
            nMap::iterator iter = yMap.find(y1);
            if( iter == yMap.end() )
                yMap[y1] = vector< pi >(1, pi(min(x1,x2), max(x1,x2)) );
            else
                yMap[y1].pb( pi(min(x1,x2), max(x1,x2)) );
        }
    }
    int count = 0;
    int mx = 0,pt = -1;
    bool xy;
    int Xor = 0;
    int last = 0, uncut = -1;
    vi piles;
    for(nMap::iterator iter = xMap.begin() ; iter != xMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        // for(int i = 0 ; i < sz(intervals) ; ++i)
        //     cout << intervals[i].first << ' ' << intervals[i].second << endl;
        sort( all(intervals) );
        int total = m;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(0);piles.pb((*iter).first);
    }
    if( (n - 1 - count) % 2 )
        Xor ^= m;
    if( count != n - 1 )
    {
        piles.pb(m);piles.pb(0);
        if( uncut >= 0 )
            piles.pb(uncut);
        else
            piles.pb(n-1);
    }
    last = 0, uncut = -1;
    count = 0;
    for(nMap::iterator iter = yMap.begin() ; iter != yMap.end() ; ++iter)
    {
        vector< pi > intervals = (*iter).second;
        sort( all(intervals) );
        int total = n;
        pi inter = pi(0,0);
        for(int i = 0 ; i < sz(intervals) ; ++i)
        {
            if( intervals[i].first > inter.second )
            {
                total -= inter.second - inter.first;
                inter = intervals[i];
            }
            else
                inter.second = max(inter.second, intervals[i].second);
        }
        total -= inter.second - inter.first;
        Xor ^= total;
        ++count;
        if( (*iter).first > last + 1 )
            uncut = last + 1;
        last = (*iter).first;
        piles.pb(total);piles.pb(1);piles.pb((*iter).first);
    }
    if( (m - 1 - count) % 2 )
        Xor ^= n;
    if( count != m - 1 )
    {
        piles.pb(n);piles.pb(1);
        if( uncut >= 0 )
            piles.pb(uncut);
        else
            piles.pb(m-1);
    }
    if( Xor )
    {
        out("FIRST");
        int bi = 0;
        for(int b = 30 ; b >= 0 ; --b)
        {
            if( bit(Xor,b) )
            {
                bi = b;
                break;
            }
        }
        for(int i = 0 ; i < sz(piles) ; i+= 3)
        {
            if( bit(piles[i],bi) )
            {
                mx = piles[i];
                xy = piles[i+1];
                pt = piles[i+2];
                break;
            }
        }
        int ans = mx - (mx ^ Xor);
        if( !xy )
        {
            if( xMap.find(pt) == xMap.end() )
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            else
            {
                vector< pi > intervals = xMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << pt << ' ' << 0 << ' ' << pt << ' ' << ans << endl;
            }
        }
        else
        {
            if( yMap.find(pt) == yMap.end() )
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            else
            {
                vector< pi > intervals = yMap[pt];
                sort( all(intervals) );
                pi inter = pi(0,0);
                for(int i = 0 ; i < sz(intervals) ; ++i)
                {
                    if( intervals[i].first > inter.second )
                    {
                        ans += inter.second - inter.first;
                        inter = intervals[i];
                    }
                    else
                        inter.second = max(inter.second, intervals[i].second);
                }
                ans += inter.second - inter.first;
                cout << 0 << ' ' << pt << ' ' << ans << ' ' << pt << endl;
            }
        }
    }
    else
        out("SECOND");
}


#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
//#include <conio.h>

using namespace std;

#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define FR(i,n) for (int i = 0; i < (n); i++)
#define DN(i,a) for(int i = (a)-1; i >= 0; i--)
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define DOWN(i,a,b) for(int i = (a); i >= (b); i--)
#define FORV(i,a) for(typeof(a.begin()) i = a.begin(); i != a.end(); i++)
#define Set(a,c) memset(a, c, sizeof(a))
#define oo 1000000000
#define MAXN 100005

typedef pair<int, int> PII;
typedef vector<int> VI;

map<int, int> mx, my;
VI a;
int shx[MAXN], shy[MAXN];
vector<PII> vx[MAXN], vy[MAXN];
int cntx, cnty, m, n;

void vertical(int x, int y1, int y2) {
    if (y1 > y2) swap(y1, y2);
    if (mx.find(x) == mx.end()) mx[x] = cntx++;
    shx[mx[x]] = x;
    vx[mx[x]].pb(mp(y1, y2));
}

void horizontal(int y, int x1, int x2) {
    if (x1 > x2) swap(x1, x2);
    if (my.find(y) == my.end()) my[y] = cnty++;
    shy[my[y]] = y;
    vy[my[y]].pb(mp(x1, x2));
}

void init() {
    FR(i, cntx) {
        sort(vx[i].begin(), vx[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vx[i].size()) {
            PII P = vx[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(m - s);
    }
    if ((n - 1 - cntx) % 2) {
        FOR(i, 1, cntx + 1) if (mx.find(i) == mx.end()) {
            mx[i] = cntx++;
            shx[mx[i]] = i;
            a.pb(m);
            break;
        }
    }

    FR(i, cnty) {
        sort(vy[i].begin(), vy[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vy[i].size()) {
            PII P = vy[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(n - s);
    }
    if ((m - 1 - cnty) % 2) {
        FOR(i, 1, cnty + 1) if (my.find(i) == my.end()) {
            my[i] = cnty++;
            shy[my[i]] = i;
            a.pb(n);
            break;
        }
    }
}

void print_x(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vx[sh].pb(mp(m, m));
    FR(i, vx[sh].size()) {
        PII P = vx[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << shx[sh] << ' ' << d << ' ' << shx[sh] << ' ' << c << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void print_y(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vy[sh].pb(mp(n, n));
    FR(i, vy[sh].size()) {
        PII P = vy[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << d << ' ' << shy[sh] << ' ' << c << ' ' << shy[sh] << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void process() {
    int g = 0;
    FR(i, a.size()) {
        g ^= a[i];
    }
    if (g == 0) cout << "SECOND" << endl;
    else {
        cout << "FIRST" << endl;
        FR(i, a.size()) if ((g^a[i]) < a[i]) {
            int x = g^a[i];
            if (i < cntx) {
                print_x(i, a[i] - x);
            } else print_y(i - cntx, a[i] - x);
            break;
        }
    }
}

int main () {
    freopen("C.in", "r", stdin);//freopen("A.out", "w", stdout);
    int k;
    cin >> n >> m >> k;
    FR(i, k) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if (x1 == x2) vertical(x1, y1, y2);
        else horizontal(y1, x1, x2);
    }
    init();
    process();
    return 0;
}


#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
//#include <conio.h>

using namespace std;

#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define FR(i,n) for (int i = 0; i < (n); i++)
#define DN(i,a) for(int i = (a)-1; i >= 0; i--)
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define DOWN(i,a,b) for(int i = (a); i >= (b); i--)
#define FORV(i,a) for(typeof(a.begin()) i = a.begin(); i != a.end(); i++)
#define Set(a,c) memset(a, c, sizeof(a))
#define oo 1000000000
#define MAXN 100005

typedef pair<int, int> PII;
typedef vector<int> VI;

map<int, int> mx, my;
VI a;
int shx[MAXN], shy[MAXN];
vector<PII> vx[MAXN], vy[MAXN];
int cntx, cnty, m, n;

void vertical(int x, int y1, int y2) {
    if (y1 > y2) swap(y1, y2);
    if (mx.find(x) == mx.end()) mx[x] = cntx++;
    shx[mx[x]] = x;
    vx[mx[x]].pb(mp(y1, y2));
}

void horizontal(int y, int x1, int x2) {
    if (x1 > x2) swap(x1, x2);
    if (my.find(y) == my.end()) my[y] = cnty++;
    shy[my[y]] = y;
    vy[my[y]].pb(mp(x1, x2));
}

void init() {
    FR(i, cntx) {
        sort(vx[i].begin(), vx[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vx[i].size()) {
            PII P = vx[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(m - s);
    }
    if ((n - 1 - cntx) % 2) {
        FOR(i, 1, cntx + 1) if (mx.find(i) == mx.end()) {
            mx[i] = cntx++;
            shx[mx[i]] = i;
            a.pb(m);
            break;
        }
    }

    FR(i, cnty) {
        sort(vy[i].begin(), vy[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vy[i].size()) {
            PII P = vy[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(n - s);
    }
    if ((m - 1 - cnty) % 2) {
        FOR(i, 1, cnty + 1) if (my.find(i) == my.end()) {
            my[i] = cnty++;
            shy[my[i]] = i;
            a.pb(n);
            break;
        }
    }
}

void print_x(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vx[sh].pb(mp(m, m));
    FR(i, vx[sh].size()) {
        PII P = vx[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << shx[sh] << ' ' << d << ' ' << shx[sh] << ' ' << c << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void print_y(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vy[sh].pb(mp(n, n));
    FR(i, vy[sh].size()) {
        PII P = vy[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << d << ' ' << shy[sh] << ' ' << c << ' ' << shy[sh] << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void process() {
    int g = 0;
    FR(i, a.size()) {
        g ^= a[i];
    }
    if (g == 0) cout << "SECOND" << endl;
    else {
        cout << "FIRST" << endl;
        FR(i, a.size()) if ((g^a[i]) < a[i]) {
            int x = g^a[i];
            if (i < cntx) {
                print_x(i, a[i] - x);
            } else print_y(i - cntx, a[i] - x);
            break;
        }
    }
}

int main () {
    //freopen("C.in", "r", stdin);//freopen("A.out", "w", stdout);
    int k;
    cin >> n >> m >> k;
    FR(i, k) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if (x1 == x2) vertical(x1, y1, y2);
        else horizontal(y1, x1, x2);
    }
    init();
    process();
    return 0;
}


#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
//#include <conio.h>

using namespace std;

#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define FR(i,n) for (int i = 0; i < (n); i++)
#define DN(i,a) for(int i = (a)-1; i >= 0; i--)
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define DOWN(i,a,b) for(int i = (a); i >= (b); i--)
#define FORV(i,a) for(typeof(a.begin()) i = a.begin(); i != a.end(); i++)
#define Set(a,c) memset(a, c, sizeof(a))
#define oo 1000000000
#define MAXN 100005

typedef pair<int, int> PII;
typedef vector<int> VI;

map<int, int> mx, my;
VI a;
int shx[MAXN], shy[MAXN];
vector<PII> vx[MAXN], vy[MAXN];
int cntx, cnty, m, n;

void vertical(int x, int y1, int y2) {
    if (y1 > y2) swap(y1, y2);
    if (mx.find(x) == mx.end()) mx[x] = cntx++;
    shx[mx[x]] = x;
    vx[mx[x]].pb(mp(y1, y2));
}

void horizontal(int y, int x1, int x2) {
    if (x1 > x2) swap(x1, x2);
    if (my.find(y) == my.end()) my[y] = cnty++;
    shy[my[y]] = y;
    vy[my[y]].pb(mp(x1, x2));
}

void init() {
    FR(i, cntx) {
        sort(vx[i].begin(), vx[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vx[i].size()) {
            PII P = vx[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(m - s);
    }
    if ((n - 1 - cntx) % 2) {
        FOR(i, 1, cntx + 1) if (mx.find(i) == mx.end()) {
            mx[i] = cntx++;
            shx[mx[i]] = i;
            a.pb(m);
            break;
        }
    }

    FR(i, cnty) {
        sort(vy[i].begin(), vy[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vy[i].size()) {
            PII P = vy[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(n - s);
    }
    if ((m - 1 - cnty) % 2) {
        FOR(i, 1, cnty + 1) if (my.find(i) == my.end()) {
            my[i] = cnty++;
            shy[my[i]] = i;
            a.pb(n);
            break;
        }
    }
}

void print_x(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vx[sh].pb(mp(m, m));
    FR(i, vx[sh].size()) {
        PII P = vx[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << shx[sh] << ' ' << d << ' ' << shx[sh] << ' ' << c << endl;
                return;
            }
            x -= len;
        }
        last = max(P.Y, last);
    }
}

void print_y(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vy[sh].pb(mp(n, n));
    FR(i, vy[sh].size()) {
        PII P = vy[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << d << ' ' << shy[sh] << ' ' << c << ' ' << shy[sh] << endl;
                return;
            }
            x -= len;
        }
        last = max(P.Y, last);
    }
}

void process() {
    int g = 0;
    FR(i, a.size()) {
        g ^= a[i];
    }
    if (g == 0) cout << "SECOND" << endl;
    else {
        cout << "FIRST" << endl;
        FR(i, a.size()) if ((g^a[i]) < a[i]) {
            int x = g^a[i];
            if (i < cntx) {
                print_x(i, a[i] - x);
            } else print_y(i - cntx, a[i] - x);
            break;
        }
    }
}

int main () {
    //freopen("C.in", "r", stdin);//freopen("A.out", "w", stdout);
    int k;
    cin >> n >> m >> k;
    FR(i, k) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if (x1 == x2) vertical(x1, y1, y2);
        else horizontal(y1, x1, x2);
    }
    init();
    process();
    return 0;
}


#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
//#include <conio.h>

using namespace std;

#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define FR(i,n) for (int i = 0; i < (n); i++)
#define DN(i,a) for(int i = (a)-1; i >= 0; i--)
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define DOWN(i,a,b) for(int i = (a); i >= (b); i--)
#define FORV(i,a) for(typeof(a.begin()) i = a.begin(); i != a.end(); i++)
#define Set(a,c) memset(a, c, sizeof(a))
#define oo 1000000000
#define MAXN 100005

typedef pair<int, int> PII;
typedef vector<int> VI;

map<int, int> mx, my;
VI a;
int shx[MAXN], shy[MAXN];
vector<PII> vx[MAXN], vy[MAXN];
int cntx, cnty, m, n;

void vertical(int x, int y1, int y2) {
    if (y1 > y2) swap(y1, y2);
    if (mx.find(x) == mx.end()) mx[x] = cntx++;
    shx[mx[x]] = x;
    vx[mx[x]].pb(mp(y1, y2));
}

void horizontal(int y, int x1, int x2) {
    if (x1 > x2) swap(x1, x2);
    if (my.find(y) == my.end()) my[y] = cnty++;
    shy[my[y]] = y;
    vy[my[y]].pb(mp(x1, x2));
}

void init() {
    FR(i, cntx) {
        sort(vx[i].begin(), vx[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vx[i].size()) {
            PII P = vx[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(m - s);
    }
    if ((n - 1 - cntx) % 2) {
        FOR(i, 1, cntx + 1) if (mx.find(i) == mx.end()) {
            mx[i] = cntx++;
            shx[mx[i]] = i;
            a.pb(m);
            break;
        }
    }

    FR(i, cnty) {
        sort(vy[i].begin(), vy[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vy[i].size()) {
            PII P = vy[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(n - s);
    }
    if ((m - 1 - cnty) % 2) {
        FOR(i, 1, cnty + 1) if (my.find(i) == my.end()) {
            my[i] = cnty++;
            shy[my[i]] = i;
            a.pb(n);
            break;
        }
    }
}

void print_x(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vx[sh].pb(mp(m, m));
    FR(i, vx[sh].size()) {
        PII P = vx[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << shx[sh] << ' ' << d << ' ' << shx[sh] << ' ' << c << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void print_y(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vy[sh].pb(mp(n, n));
    FR(i, vy[sh].size()) {
        PII P = vy[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << d << ' ' << shy[sh] << ' ' << c << ' ' << shy[sh] << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void process() {
    int g = 0;
    FR(i, a.size()) {
        g ^= a[i];
    }
    if (g == 0) cout << "SECOND" << endl;
    else {
        cout << "FIRST" << endl;
        FR(i, a.size()) if (g^a[i] < a[i]) {
            int x = g^a[i];
            if (i < cntx) {
                print_x(i, a[i] - x);
            } else print_y(i - cntx, a[i] - x);
        }
    }
}

int main () {
    //freopen("C.in", "r", stdin);//freopen("A.out", "w", stdout);
    int k;
    cin >> n >> m >> k;
    FR(i, k) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if (x1 == x2) vertical(x1, y1, y2);
        else horizontal(y1, x1, x2);
    }
    init();
    process();
    return 0;
}


#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
//#include <conio.h>

using namespace std;

#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a)*(a))
#define FR(i,n) for (int i = 0; i < (n); i++)
#define DN(i,a) for(int i = (a)-1; i >= 0; i--)
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define DOWN(i,a,b) for(int i = (a); i >= (b); i--)
#define FORV(i,a) for(typeof(a.begin()) i = a.begin(); i != a.end(); i++)
#define Set(a,c) memset(a, c, sizeof(a))
#define oo 1000000000
#define MAXN 100005

typedef pair<int, int> PII;
typedef vector<int> VI;

map<int, int> mx, my;
VI a;
int shx[MAXN], shy[MAXN];
vector<PII> vx[MAXN], vy[MAXN];
int cntx, cnty, m, n;

void vertical(int x, int y1, int y2) {
    if (y1 > y2) swap(y1, y2);
    if (mx.find(x) == mx.end()) mx[x] = cntx++;
    shx[mx[x]] = x;
    vx[mx[x]].pb(mp(y1, y2));
}

void horizontal(int y, int x1, int x2) {
    if (x1 > x2) swap(x1, x2);
    if (my.find(y) == my.end()) my[y] = cnty++;
    shy[my[y]] = y;
    vy[my[y]].pb(mp(x1, x2));
}

void init() {
    FR(i, cntx) {
        sort(vx[i].begin(), vx[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vx[i].size()) {
            PII P = vx[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(m - s);
    }
    if ((n - 1 - cntx) % 2) {
        FOR(i, 1, cntx + 1) if (mx.find(i) == mx.end()) {
            mx[i] = cntx++;
            shx[mx[i]] = i;
            a.pb(m);
            break;
        }
    }

    FR(i, cnty) {
        sort(vy[i].begin(), vy[i].end());
        int last = - 1;
        int s = 0;
        FR(j, vy[i].size()) {
            PII P = vy[i][j];
            if (P.Y > last) {
                if (P.X >= last) s += P.Y - P.X;
                else s += P.Y - last;
                last = P.Y;
            }
        }
        a.pb(n - s);
    }
    if ((m - 1 - cnty) % 2) {
        FOR(i, 1, cnty + 1) if (my.find(i) == my.end()) {
            my[i] = cnty++;
            shy[my[i]] = i;
            a.pb(n);
            break;
        }
    }
}

void print_x(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vx[sh].pb(mp(m, m));
    FR(i, vx[sh].size()) {
        PII P = vx[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << shx[sh] << ' ' << d << ' ' << shx[sh] << ' ' << c << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void print_y(int sh, int x) {
    int d = 0, c;
    int last = 0;
    vy[sh].pb(mp(n, n));
    FR(i, vy[sh].size()) {
        PII P = vy[sh][i];
        if (P.X > last) {
            int len = P.X - last;
            if (len >= x) {
                c = last + x;
                cout << d << ' ' << shy[sh] << ' ' << c << ' ' << shy[sh] << endl;
                return;
            }
        }
        last = max(P.Y, last);
    }
}

void process() {
    int g = 0;
    FR(i, a.size()) {
        g ^= a[i];
    }
    if (g == 0) cout << "SECOND" << endl;
    else {
        cout << "FIRST" << endl;
        FR(i, a.size()) if (g^a[i] < a[i]) {
            int x = g^a[i];
            if (i < cntx) {
                print_x(i, a[i] - x);
            } else print_y(i - cntx, a[i] - x);
            break;
        }
    }
}

int main () {
    //freopen("C.in", "r", stdin);//freopen("A.out", "w", stdout);
    int k;
    cin >> n >> m >> k;
    FR(i, k) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if (x1 == x2) vertical(x1, y1, y2);
        else horizontal(y1, x1, x2);
    }
    init();
    process();
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define pb push_back
#define pii pair<int, int>
#define m_p make_pair
#define X first
#define Y second
using namespace std;

typedef long long ll;
typedef long double ldouble;

const int N = 100010;

struct Seg{
    int f, t, a, b;
}s[N];

bool cmp (const Seg &a, const Seg &b) {
    if(a.f != b.f) return a.f < b.f;
    if(a.t != b.t) return a.t < b.t;
    if(a.a != b.a) return a.a < b.a;
    return a.b < b.b;
}

vector< pii > cn, cm, z;

int n, m;

void doit(int a, int b) {
    int now = a, nowy = s[a].b, ans = 0;
    for(int i = a + 1; i <= b; i++) {
        if(s[i].a > nowy) {
            ans += nowy - s[now].a;
            now = i, nowy = s[i].b;
        } else {
            nowy = max(nowy, s[i].b);
        }
    }
    ans += (nowy - s[now].a);
    if(s[a].f == 0) cm.pb(m_p(m - ans, s[a].t));
    else cn.pb(m_p(n - ans, s[a].t));
}

void output(int f, int p, int q) {
    if(f == 0) {
        printf("%d %d %d %d\n", p, 0, p, q);
    } else printf("%d %d %d %d\n", 0, p, q, p);
}

void find(int f, int p, int v, int k) {
    for(int i = 0; i < k; i++) {
        if(s[i].f == f && s[i].t == p) {
            z.pb(m_p(s[i].a ,s[i].b));
        }
    }
    int now = 0, g = 0;
    for(int i = 0; i < z.size(); i++) {
        g += max(0, z[i].X - now);
        if(g > v) {
            output(f, p, now + v - g);
            return;
        } else {
            now = max(now, z[i].Y);
        }
    }
    output(f, p, now + v - g);
}

int main()
{
    int k;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 1, my = 1;
    for(int i = 0; i < k; i++) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if(x1 == x2) {
            s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
        } else {
            s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
        }
    }
    sort(s, s + k, cmp);
    for(int i = 0; i < k; i++) {
        //printf("%d %d %d %d\n", s[i].f, s[i].t, s[i].a ,s[i].b);
        if(s[i].f == 0 && s[i].t == mx) mx++;
        else if(s[i].f == 1 && s[i].t == my) my++;
    }
    //puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    int now = 0;
    for(int i = 1; i < k; i++) {
        if(s[i].f == s[now].f && s[i].t == s[now].t) continue;
        doit(now, i - 1);
        now = i;
    }
    if(k > 0) doit(now, k - 1);
    now = 0;
    int temp = (m - (int)cn.size());
    if(temp % 2 == 0) now ^= n;
    temp = (n - (int)cm.size());
    if(temp % 2 == 0) now ^= m;
//    for(int i = 0; i < cn.size(); i++) {
//        printf("%d %d\n", cn[i].X, cn[i].Y);
//    }
//    for(int i = 0; i < cm.size(); i++) {
//        printf("%d %d\n", cm[i].X, cm[i].Y);
//    }
    for(int i = 0; i < cn.size(); i++) now ^= cn[i].X;
    for(int i = 0; i < cm.size(); i++) now ^= cm[i].X;
    if(now == 0) printf("SECOND\n");
    else {
        printf("FIRST\n");
        for(int i = 0; i < cn.size(); i++) {
            int tt = now;
            if((tt ^ cn[i].X) <= cn[i].X) {
                find(1, cn[i].Y, cn[i].X - (tt ^ cn[i].X), k);
                return 0;
            }
        }
        for(int i = 0; i < cm.size(); i++) {
            int tt = now;
            if((tt ^ cm[i].X) <= cm[i].X) {
                find(0, cn[i].Y, cm[i].X - (tt ^ cm[i].X), k);
                return 0;
            }
        }
        int tt = now;
        if((tt ^ m) <= m) {
            printf("%d %d %d %d\n", mx, 0, mx, m - (tt ^ m));
        } else printf("%d %d %d %d\n", 0, n - (tt ^ n), now, my);
    }

    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define pb push_back
#define pii pair<int, int>
#define m_p make_pair
#define X first
#define Y second
using namespace std;

typedef long long ll;
typedef long double ldouble;

const int N = 100010;

struct Seg{
    int f, t, a, b;
}s[N];

bool cmp (const Seg &a, const Seg &b) {
    if(a.f != b.f) return a.f < b.f;
    if(a.t != b.t) return a.t < b.t;
    if(a.a != b.a) return a.a < b.a;
    return a.b < b.b;
}

vector< pii > cn, cm, z;

int n, m;

void doit(int a, int b) {
    int now = a, nowy = s[a].b, ans = 0;
    for(int i = a + 1; i <= b; i++) {
        if(s[i].a > nowy) {
            ans += nowy - s[now].a;
            now = i, nowy = s[i].b;
        } else {
            nowy = max(nowy, s[i].b);
        }
    }
    ans += (nowy - s[now].a);
    if(s[a].f == 0) cm.pb(m_p(m - ans, s[a].t));
    else cn.pb(m_p(n - ans, s[a].t));
}

void output(int f, int p, int q) {
    if(f == 0) {
        printf("%d %d %d %d\n", p, 0, p, q);
    } else printf("%d %d %d %d\n", 0, p, q, p);
}

void find(int f, int p, int v, int k) {
    for(int i = 0; i < k; i++) {
        if(s[i].f == f && s[i].t == p) {
            z.pb(m_p(s[i].a ,s[i].b));
        }
    }
    int now = 0, g = 0;
    for(int i = 0; i < z.size(); i++) {
        g += max(0, z[i].X - now);
        if(g > v) {
            output(f, p, now + v - g);
            return;
        } else {
            now = max(now, z[i].Y);
        }
    }
    output(f, p, now + v - g);
}

int main()
{
    int k;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 1, my = 1;
    for(int i = 0; i < k; i++) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if(x1 == x2) {
            s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
        } else {
            s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
        }
    }
    sort(s, s + k, cmp);
    for(int i = 0; i < k; i++) {
        //printf("%d %d %d %d\n", s[i].f, s[i].t, s[i].a ,s[i].b);
        if(s[i].f == 0 && s[i].t == mx) mx++;
        else if(s[i].f == 1 && s[i].t == my) my++;
    }
    //puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    int now = 0;
    for(int i = 1; i < k; i++) {
        if(s[i].f == s[now].f && s[i].t == s[now].t) continue;
        doit(now, i - 1);
        now = i;
    }
    if(k > 0) doit(now, k - 1);
    now = 0;
    int temp = (m - (int)cn.size());
    if(temp % 2 == 0) now ^= n;
    temp = (n - (int)cm.size());
    if(temp % 2 == 0) now ^= m;
//    for(int i = 0; i < cn.size(); i++) {
//        printf("%d %d\n", cn[i].X, cn[i].Y);
//    }
//    for(int i = 0; i < cm.size(); i++) {
//        printf("%d %d\n", cm[i].X, cm[i].Y);
//    }
    for(int i = 0; i < cn.size(); i++) now ^= cn[i].X;
    for(int i = 0; i < cm.size(); i++) now ^= cm[i].X;
    if(now == 0) printf("SECOND\n");
    else {
        printf("FIRST\n");
        for(int i = 0; i < cn.size(); i++) {
            int tt = now;
            if((tt ^ cn[i].X) <= cn[i].X) {
                find(1, cn[i].Y, cn[i].X - (tt ^ cn[i].X), k);
                return 0;
            }
        }
        for(int i = 0; i < cm.size(); i++) {
            int tt = now;
            if((tt ^ cm[i].X) <= cm[i].X) {
                find(0, cn[i].Y, cm[i].X - (tt ^ cm[i].X), k);
                return 0;
            }
        }
        int tt = now;
        if((tt ^ m) <= m) {
            printf("%d %d %d %d\n", mx, 0, mx, m - (tt ^ m));
        } else printf("%d %d %d %d\n", 0, my, n - (tt ^ n), my);
    }

    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define pb push_back
#define pii pair<int, int>
#define m_p make_pair
#define X first
#define Y second
using namespace std;

typedef long long ll;
typedef long double ldouble;

const int N = 100010;

struct Seg{
    int f, t, a, b;
}s[N];

bool cmp (const Seg &a, const Seg &b) {
    if(a.f != b.f) return a.f < b.f;
    if(a.t != b.t) return a.t < b.t;
    if(a.a != b.a) return a.a < b.a;
    return a.b < b.b;
}

vector< pii > cn, cm, z;

int n, m;

void doit(int a, int b) {
    int now = a, nowy = s[a].b, ans = 0;
    for(int i = a + 1; i <= b; i++) {
        if(s[i].a > nowy) {
            ans += nowy - s[now].a;
            now = i, nowy = s[i].b;
        } else {
            nowy = max(nowy, s[i].b);
        }
    }
    ans += (nowy - s[now].a);
    if(s[a].f == 0) cm.pb(m_p(m - ans, s[a].t));
    else cn.pb(m_p(n - ans, s[a].t));
}

void output(int f, int p, int q) {
    if(f == 0) {
        printf("%d %d %d %d\n", p, 0, p, q);
    } else printf("%d %d %d %d\n", 0, p, q, p);
}

void find(int f, int p, int v, int k) {
    for(int i = 0; i < k; i++) {
        if(s[i].f == f && s[i].t == p) {
            z.pb(m_p(s[i].a ,s[i].b));
        }
    }
    int now = 0, g = 0;
    for(int i = 0; i < z.size(); i++) {
        g += max(0, z[i].X - now);
        if(g >= v) {
            output(f, p, now + v - g);
            return;
        } else {
            now = max(now, z[i].Y);
        }
    }
    output(f, p, now + v - g);
}

int main()
{
    int k;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 1, my = 1;
    for(int i = 0; i < k; i++) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if(x1 == x2) {
            s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
        } else {
            s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
        }
    }
    sort(s, s + k, cmp);
    for(int i = 0; i < k; i++) {
        //printf("%d %d %d %d\n", s[i].f, s[i].t, s[i].a ,s[i].b);
        if(s[i].f == 0 && s[i].t == mx) mx++;
        else if(s[i].f == 1 && s[i].t == my) my++;
    }
    //puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    int now = 0;
    for(int i = 1; i < k; i++) {
        if(s[i].f == s[now].f && s[i].t == s[now].t) continue;
        doit(now, i - 1);
        now = i;
    }
    if(k > 0) doit(now, k - 1);
    now = 0;
    int temp = (m - (int)cn.size());
    if(temp % 2 == 0) now ^= n;
    temp = (n - (int)cm.size());
    if(temp % 2 == 0) now ^= m;
//    for(int i = 0; i < cn.size(); i++) {
//        printf("%d %d\n", cn[i].X, cn[i].Y);
//    }
//    for(int i = 0; i < cm.size(); i++) {
//        printf("%d %d\n", cm[i].X, cm[i].Y);
//    }
    for(int i = 0; i < cn.size(); i++) now ^= cn[i].X;
    for(int i = 0; i < cm.size(); i++) now ^= cm[i].X;
    if(now == 0) printf("SECOND\n");
    else {
        printf("FIRST\n");
        for(int i = 0; i < cn.size(); i++) {
            int tt = now;
            if((tt ^ cn[i].X) <= cn[i].X) {
                find(1, cn[i].Y, cn[i].X - (tt ^ cn[i].X), k);
                return 0;
            }
        }
        for(int i = 0; i < cm.size(); i++) {
            int tt = now;
            if((tt ^ cm[i].X) <= cm[i].X) {
                find(0, cn[i].Y, cm[i].X - (tt ^ cm[i].X), k);
                return 0;
            }
        }
        int tt = now;
        if((tt ^ m) <= m) {
            printf("%d %d %d %d\n", mx, 0, mx, m - (tt ^ m));
        } else printf("%d %d %d %d\n", 0, my, n - (tt ^ n), my);
    }

    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define pb push_back
#define pii pair<int, int>
#define m_p make_pair
#define X first
#define Y second
using namespace std;

typedef long long ll;
typedef long double ldouble;

const int N = 100010;

struct Seg{
    int f, t, a, b;
}s[N];

bool cmp (const Seg &a, const Seg &b) {
    if(a.f != b.f) return a.f < b.f;
    if(a.t != b.t) return a.t < b.t;
    if(a.a != b.a) return a.a < b.a;
    return a.b < b.b;
}

vector< pii > cn, cm, z;

int n, m;

void doit(int a, int b) {
    int now = a, nowy = s[a].b, ans = 0;
    for(int i = a + 1; i <= b; i++) {
        if(s[i].a > nowy) {
            ans += nowy - s[now].a;
            now = i, nowy = s[i].b;
        } else {
            nowy = max(nowy, s[i].b);
        }
    }
    ans += (nowy - s[now].a);
    if(s[a].f == 0) cm.pb(m_p(m - ans, s[a].t));
    else cn.pb(m_p(n - ans, s[a].t));
}

void output(int f, int p, int q) {
    if(f == 0) {
        printf("%d %d %d %d\n", p, 0, p, q);
    } else printf("%d %d %d %d\n", 0, p, q, p);
}

void find(int f, int p, int v, int k) {
    for(int i = 0; i < k; i++) {
        if(s[i].f == f && s[i].t == p) {
            z.pb(m_p(s[i].a ,s[i].b));
        }
    }
    int now = 0, g = 0;
    for(int i = 0; i < z.size(); i++) {
        g += max(0, z[i].X - now);
        if(g > v) {
            output(f, p, now + v - g);
            return;
        } else {
            now = max(now, z[i].Y);
        }
    }
    output(f, p, now + v - g);
}

int main()
{
    int k;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 1, my = 1;
    for(int i = 0; i < k; i++) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if(x1 == x2) {
            s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
        } else {
            s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
        }
    }
    sort(s, s + k, cmp);
    for(int i = 0; i < k; i++) {
        //printf("%d %d %d %d\n", s[i].f, s[i].t, s[i].a ,s[i].b);
        if(s[i].f == 0 && s[i].t == mx) mx++;
        else if(s[i].f == 1 && s[i].t == my) my++;
    }
    //puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    int now = 0;
    for(int i = 1; i < k; i++) {
        if(s[i].f == s[now].f && s[i].t == s[now].t) continue;
        doit(now, i - 1);
        now = i;
    }
    if(k > 0) doit(now, k - 1);
    now = 0;
    int temp = (m - (int)cn.size());
    if(temp % 2 == 0) now ^= n;
    temp = (n - (int)cm.size());
    if(temp % 2 == 0) now ^= m;
//    for(int i = 0; i < cn.size(); i++) {
//        printf("%d %d\n", cn[i].X, cn[i].Y);
//    }
//    for(int i = 0; i < cm.size(); i++) {
//        printf("%d %d\n", cm[i].X, cm[i].Y);
//    }
    for(int i = 0; i < cn.size(); i++) now ^= cn[i].X;
    for(int i = 0; i < cm.size(); i++) now ^= cm[i].X;
    if(now == 0) printf("SECOND\n");
    else {
        printf("FIRST\n");
        for(int i = 0; i < cn.size(); i++) {
            int tt = now;
            if((tt ^ cn[i].X) <= cn[i].X) {
                find(1, cn[i].Y, (tt ^ cn[i].X), k);
                return 0;
            }
        }
        for(int i = 0; i < cm.size(); i++) {
            int tt = now;
            if((tt ^ cm[i].X) <= cm[i].X) {
                find(0, cn[i].Y, (tt ^ cm[i].X), k);
                return 0;
            }
        }
        int tt = now;
        if((tt ^ m) <= m) {
            printf("%d %d %d %d\n", mx, 0, mx, now);
        } else printf("%d %d %d %d\n", 0, my, now, my);
    }

    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define pb push_back
#define pii pair<int, int>
#define m_p make_pair
#define X first
#define Y second
using namespace std;

typedef long long ll;
typedef long double ldouble;

const int N = 100010;

struct Seg{
    int f, t, a, b;
}s[N];

bool cmp (const Seg &a, const Seg &b) {
    if(a.f != b.f) return a.f < b.f;
    if(a.t != b.t) return a.t < b.t;
    if(a.a != b.a) return a.a < b.a;
    return a.b < b.b;
}

vector< pii > cn, cm, z;

int n, m;

void doit(int a, int b) {
    int now = a, nowy = s[a].b, ans = 0;
    for(int i = a + 1; i <= b; i++) {
        if(s[i].a > nowy) {
            ans += nowy - s[now].a;
            now = i, nowy = s[i].b;
        } else {
            nowy = max(nowy, s[i].b);
        }
    }
    ans += (nowy - s[now].a);
    if(s[a].f == 0) cm.pb(m_p(m - ans, s[a].t));
    else cn.pb(m_p(n - ans, s[a].t));
}

void output(int f, int p, int q) {
    if(f == 0) {
        printf("%d %d %d %d\n", p, 0, p, q);
    } else printf("%d %d %d %d\n", 0, p, q, p);
}

void find(int f, int p, int v, int k) {
    for(int i = 0; i < k; i++) {
        if(s[i].f == f && s[i].t == p) {
            z.pb(m_p(s[i].a ,s[i].b));
        }
    }
    int now = 0, g = 0;
    for(int i = 0; i < z.size(); i++) {
        g += max(0, z[i].X - now);
        now = max(now, z[i].Y);
        if(g >= v) {
            output(f, p, now + v - g);
            return;
        }
    }
    output(f, p, now + v - g);
}

int main()
{
    int k;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 1, my = 1;
    for(int i = 0; i < k; i++) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if(x1 == x2) {
            s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
        } else {
            s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
        }
    }
    sort(s, s + k, cmp);
    for(int i = 0; i < k; i++) {
        //printf("%d %d %d %d\n", s[i].f, s[i].t, s[i].a ,s[i].b);
        if(s[i].f == 0 && s[i].t == mx) mx++;
        else if(s[i].f == 1 && s[i].t == my) my++;
    }
    //puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    int now = 0;
    for(int i = 1; i < k; i++) {
        if(s[i].f == s[now].f && s[i].t == s[now].t) continue;
        doit(now, i - 1);
        now = i;
    }
    if(k > 0) doit(now, k - 1);
    now = 0;
    int temp = (m - (int)cn.size());
    if(temp % 2 == 0) now ^= n;
    temp = (n - (int)cm.size());
    if(temp % 2 == 0) now ^= m;
//    for(int i = 0; i < cn.size(); i++) {
//        printf("%d %d\n", cn[i].X, cn[i].Y);
//    }
//    for(int i = 0; i < cm.size(); i++) {
//        printf("%d %d\n", cm[i].X, cm[i].Y);
//    }
    for(int i = 0; i < cn.size(); i++) now ^= cn[i].X;
    for(int i = 0; i < cm.size(); i++) now ^= cm[i].X;
    if(now == 0) printf("SECOND\n");
    else {
        printf("FIRST\n");
        for(int i = 0; i < cn.size(); i++) {
            int tt = now;
            if((tt ^ cn[i].X) <= cn[i].X) {
                find(1, cn[i].Y, cn[i].X - (tt ^ cn[i].X), k);
                return 0;
            }
        }
        for(int i = 0; i < cm.size(); i++) {
            int tt = now;
            if((tt ^ cm[i].X) <= cm[i].X) {
                find(0, cm[i].Y, cm[i].X - (tt ^ cm[i].X), k);
                return 0;
            }
        }
        int tt = now;
        if((tt ^ m) <= m) {
            printf("%d %d %d %d\n", mx, 0, mx, m - (tt ^ m));
        } else printf("%d %d %d %d\n", 0, my, n - (tt ^ n), my);
    }

    return 0;
}


#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define pb push_back
#define pii pair<int, int>
#define m_p make_pair
#define X first
#define Y second
using namespace std;

typedef long long ll;
typedef long double ldouble;

const int N = 100010;

struct Seg{
    int f, t, a, b;
}s[N];

bool cmp (const Seg &a, const Seg &b) {
    if(a.f != b.f) return a.f < b.f;
    if(a.t != b.t) return a.t < b.t;
    if(a.a != b.a) return a.a < b.a;
    return a.b < b.b;
}

vector< pii > cn, cm, z;

int n, m;

void doit(int a, int b) {
    int now = a, nowy = s[a].b, ans = 0;
    for(int i = a + 1; i <= b; i++) {
        if(s[i].a > nowy) {
            ans += nowy - s[now].a;
            now = i, nowy = s[i].b;
        } else {
            nowy = max(nowy, s[i].b);
        }
    }
    ans += (nowy - s[now].a);
    if(s[a].f == 0) cm.pb(m_p(m - ans, s[a].t));
    else cn.pb(m_p(n - ans, s[a].t));
}

void output(int f, int p, int q) {
    if(f == 0) {
        printf("%d %d %d %d\n", p, 0, p, q);
    } else printf("%d %d %d %d\n", 0, p, q, p);
}

void find(int f, int p, int v, int k) {
    for(int i = 0; i < k; i++) {
        if(s[i].f == f && s[i].t == p) {
            z.pb(m_p(s[i].a ,s[i].b));
        }
    }
    int now = 0, g = 0;
    for(int i = 0; i < z.size(); i++) {
        g += max(0, z[i].X - now);
        now = max(now, z[i].Y);
        if(g >= v) {
            output(f, p, z[i].X + v - g);
            return;
        }
    }
    output(f, p, now + v - g);
}

int main()
{
    int k;
    scanf("%d%d%d", &n, &m, &k);
    int mx = 1, my = 1;
    for(int i = 0; i < k; i++) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        if(x1 == x2) {
            s[i].f = 0, s[i].t = x1, s[i].a = min(y1, y2), s[i].b = max(y1, y2);
        } else {
            s[i].f = 1, s[i].t = y1, s[i].a = min(x1, x2), s[i].b = max(x1, x2);
        }
    }
    sort(s, s + k, cmp);
    for(int i = 0; i < k; i++) {
        //printf("%d %d %d %d\n", s[i].f, s[i].t, s[i].a ,s[i].b);
        if(s[i].f == 0 && s[i].t == mx) mx++;
        else if(s[i].f == 1 && s[i].t == my) my++;
    }
    //puts("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    int now = 0;
    for(int i = 1; i < k; i++) {
        if(s[i].f == s[now].f && s[i].t == s[now].t) continue;
        doit(now, i - 1);
        now = i;
    }
    if(k > 0) doit(now, k - 1);
    now = 0;
    int temp = (m - (int)cn.size());
    if(temp % 2 == 0) now ^= n;
    temp = (n - (int)cm.size());
    if(temp % 2 == 0) now ^= m;
//    for(int i = 0; i < cn.size(); i++) {
//        printf("%d %d\n", cn[i].X, cn[i].Y);
//    }
//    for(int i = 0; i < cm.size(); i++) {
//        printf("%d %d\n", cm[i].X, cm[i].Y);
//    }
    for(int i = 0; i < cn.size(); i++) now ^= cn[i].X;
    for(int i = 0; i < cm.size(); i++) now ^= cm[i].X;
    if(now == 0) printf("SECOND\n");
    else {
        printf("FIRST\n");
        for(int i = 0; i < cn.size(); i++) {
            int tt = now;
            if((tt ^ cn[i].X) <= cn[i].X) {
                find(1, cn[i].Y, cn[i].X - (tt ^ cn[i].X), k);
                return 0;
            }
        }
        for(int i = 0; i < cm.size(); i++) {
            int tt = now;
            if((tt ^ cm[i].X) <= cm[i].X) {
                find(0, cm[i].Y, cm[i].X - (tt ^ cm[i].X), k);
                return 0;
            }
        }
        int tt = now;
        if((tt ^ m) <= m) {
            printf("%d %d %d %d\n", mx, 0, mx, m - (tt ^ m));
        } else printf("%d %d %d %d\n", 0, my, n - (tt ^ n), my);
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <set>

const int N=100010;

using namespace std;

#define pb push_back
#define sz(x)((x).size())

struct data
{
    int l,r,x;
    data() {}
    data(int l,int r,int x):l(l),r(r),x(x) {}
    bool operator < (const data &a) const
    {
        if(a.x!=x) return x<a.x;
        return l<a.l;
    }
}v1[N],v2[N];

int cnt1,cnt2;

int main()
{
//    freopen("in.txt","r",stdin);
    int n,m;
    int k;
    set<int> A,B;
    scanf("%d%d%d",&n,&m,&k);
    for(int i=0;i<k;i++)
    {
        int x1,x2,y1,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(x1==x2 && (x1==0 || x1==n)) continue;
        if(y1==y2 && (y1==0 || y1==m)) continue;
        if(x1==x2) v2[cnt2++]=data(min(y1,y2),max(y1,y2),x1),A.insert(x1);
        else v1[cnt1++]=data(min(x1,x2),max(x1,x2),y1),B.insert(x2);
    }
    sort(v1,v1+cnt1);
    sort(v2,v2+cnt2);
    int a=m-1,b=n-1;
    int ret=0;
    for(int i=0,s=0;i<cnt1;)
    {
        int j=i;
        int tmp=n;
        while(v1[i].x==v1[j].x && j<cnt1)
        {
            if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        a--;
    }
    for(int i=0,s=0;i<cnt2;)
    {
        int j=i;
        int tmp=m;
        while(v2[i].x==v2[j].x && j<cnt2)
        {
            if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        b--;
    }
    if(a&1) ret^=n;
    if(b&1) ret^=m;
    if(ret)
    {
        cout<<"FIRST\n";
        if(a && n-(ret^n)>0)
        {
            for(int i=1;;i++)
            {
                if(!A.count(i))
                {
                    cout<<0<<" "<<i<<" "<<n-(ret^n)<<" "<<i<<endl;
                    return 0;
                }
            }
        }
        if(b && m-(ret^m)>=0)
        {
            for(int i=1;;i++)
            {
                if(!B.count(i))
                {
                    cout<<i<<" "<<0<<" "<<i<<" "<<m-(ret^m)<<endl;
                    return 0;
                }
            }
        }
        for(int i=0,j=0,s=0;i<cnt1;i=j)
        {
            int tmp=n;
            while(v1[i].x==v1[j].x && j<cnt1)
            {
                if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i;k<=j;k++,s=max(s,v1[k].r))
            {
                if(v1[k].l<=s) continue;
                if(v1[k].l-s<t) {t-=v1[k].l-s;continue;}
                cout<<0<<" "<<v1[i].x<<" "<<s+t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            cout<<0<<" "<<v1[i].x<<" "<<s+t<<" "<<v1[i].x<<"\n";
            return 0;
        }

        for(int i=0,j=0,s=0;i<cnt2;i=j)
        {
            j=i;
            int tmp=m;
            while(v2[i].x==v2[j].x && j<cnt2)
            {
                if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i,s=0;k<=j;k++,s=max(s,v1[k].r))
            {
                if(v2[k].l<=s) continue;
                if(v2[k].l-s<t) {t-=v2[k].l-s;continue;}
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<s+t<<"\n";
                return 0;
            }
            cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<s+t<<"\n";
            return 0;
        }
    }
    cout<<"SECOND\n";
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <set>

const int N=100010;

using namespace std;

#define pb push_back
#define sz(x)((x).size())

typedef long long ll;

struct data
{
    int l,r,x;
    data() {}
    data(int l,int r,int x):l(l),r(r),x(x) {}
    bool operator < (const data &a) const
    {
        if(a.x!=x) return x<a.x;
        return l<a.l;
    }
}v1[N],v2[N];

int cnt1,cnt2;

int main()
{
//    freopen("in.txt","r",stdin);
    ll n,m;
    int k;
    scanf("%I64d%I64d%d",&n,&m,&k);
    for(int i=0;i<k;i++)
    {
        int x1,x2,y1,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(x1==x2) v2[cnt2++]=data(min(y1,y2),max(y1,y2),x1);
        else v1[cnt1++]=data(min(x1,x2),max(x1,x2),y1);
    }
    v1[cnt1++]=data(0,0,1);
    v2[cnt2++]=data(0,0,1);
    sort(v1,v1+cnt1);
    sort(v2,v2+cnt2);
    int a=m-1,b=n-1;
    ll ret=0;
    for(int i=0;i<cnt1;)
    {
        int j=i;
        int tmp=n;
        while(v1[i].x==v1[j].x && j<cnt1)
        {
            if(v1[i].r>v1[j].l) tmp-=v1[j].r-v1[i].r;
            else tmp-=v1[j].r-v1[j].l;
            j++;
        }
        i=j;
        ret^=tmp;
        a--;
    }
    for(int i=0;i<cnt2;)
    {
        int j=i;
        int tmp=m;
        while(v2[i].x==v2[j].x && j<cnt2)
        {
            if(v2[i].r>v2[j].l) tmp-=v2[j].r-v2[i].r;
            else tmp-=v2[j].r-v2[j].l;
            j++;
        }
        i=j;
        ret^=tmp;
        b--;
    }
    if(a&1) ret^=n;
    if(b&1) ret^=m;
    if(ret)
    {
        cout<<"FIRST\n";
        for(int i=0,j=0;i<cnt1;i=j)
        {
            int tmp=n;
            while(v1[i].x==v1[j].x && j<cnt1)
            {
                if(v1[i].r>v1[j].l) tmp-=v1[j].r-v1[i].r;
                else tmp-=v1[j].r-v1[j].l;
                j++;
            }
            ll t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            if(v1[i].l>=t)
            {
                cout<<"TT"<<endl;
                cout<<0<<" "<<v1[i].x<<" "<<t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            t-=v1[i].l;
            for(int k=i+1;k<=j;k++)
            {
                if(v1[k-1].r>v1[k].l) continue;
                if(v1[k].l-v1[k-1].r<t) {t-=v1[k].l-v1[k-1].r;continue;}
                cout<<0<<" "<<v1[i].x<<" "<<v1[k-1].r+t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            cout<<0<<" "<<v1[i].x<<" "<<v1[j].r+t<<" "<<v1[i].x<<"\n";
            return 0;
        }

        for(int i=0,j=0;i<cnt2;i=j)
        {
            j=i;
            int tmp=m;
            while(v2[i].x==v2[j].x && j<cnt2)
            {
                if(v2[i].r>v2[j].l) tmp-=v2[j].r-v2[i].r;
                else tmp-=v2[j].r-v2[j].l;
                j++;
            }
            ll t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            if(v2[i].l>=t)
            {
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<t<<"\n";
                return 0;
            }
            t-=v2[i].l;
            for(int k=i+1;k<=j;k++)
            {
                if(v2[k-1].r>v2[k].l) continue;
                if(v2[k].l-v2[k-1].r<t) {t-=v2[k].l-v2[k-1].r;continue;}
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<v2[k-1].r+t<<"\n";
                return 0;
            }
            cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<v2[j].r+t<<"\n";
            return 0;
        }
    }
    cout<<"SECOND\n";
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <set>

const int N=100010;

using namespace std;

#define pb push_back
#define sz(x)((x).size())

struct data
{
    int l,r,x;
    data() {}
    data(int l,int r,int x):l(l),r(r),x(x) {}
    bool operator < (const data &a) const
    {
        if(a.x!=x) return x<a.x;
        return l<a.l;
    }
}v1[N],v2[N];

int cnt1,cnt2;

int main()
{
//    freopen("in.txt","r",stdin);
    int n,m;
    int k;
    set<int> A,B;
    scanf("%d%d%d",&n,&m,&k);
    for(int i=0;i<k;i++)
    {
        int x1,x2,y1,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(x1==x2 && (x1==0 || x1==n)) continue;
        if(y1==y2 && (y1==0 || y1==m)) continue;
        if(x1==x2) v2[cnt2++]=data(min(y1,y2),max(y1,y2),x1),A.insert(x1);
        else v1[cnt1++]=data(min(x1,x2),max(x1,x2),y1),B.insert(x2);
    }
    sort(v1,v1+cnt1);
    sort(v2,v2+cnt2);
    int a=m-1,b=n-1;
    int ret=0;
    for(int i=0,s=0;i<cnt1;)
    {
        int j=i;
        int tmp=n;
        while(v1[i].x==v1[j].x && j<cnt1)
        {
            if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        a--;
    }
    for(int i=0,s=0;i<cnt2;)
    {
        int j=i;
        int tmp=m;
        while(v2[i].x==v2[j].x && j<cnt2)
        {
            if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        b--;
    }
    if(a&1) ret^=n;
    if(b&1) ret^=m;
    if(ret)
    {
        cout<<"FIRST\n";
        if(a && n-(ret^n)>0)
        {
            for(int i=1;;i++)
            {
                if(!A.count(i))
                {
                    cout<<0<<" "<<i<<" "<<n-(ret^n)<<" "<<i<<endl;
                    return 0;
                }
            }
        }
        if(b && m-(ret^m)>=0)
        {
            for(int i=1;;i++)
            {
                if(!B.count(i))
                {
                    cout<<i<<" "<<0<<" "<<i<<" "<<m-(ret^m)<<endl;
                    return 0;
                }
            }
        }
        for(int i=0,j=0,s=0;i<cnt1;i=j)
        {
            int tmp=n;
            while(v1[i].x==v1[j].x && j<cnt1)
            {
                if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i+1;k<=j;k++)
            {
                if(v1[k].l<=s) continue;
                if(v1[k].l-s<t) {t-=v1[k].l-s;s=v1[i].r;continue;}
                cout<<0<<" "<<v1[i].x<<" "<<s+t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            cout<<0<<" "<<v1[i].x<<" "<<v1[j].r+t<<" "<<v1[i].x<<"\n";
            return 0;
        }

        for(int i=0,j=0,s=0;i<cnt2;i=j)
        {
            j=i;
            int tmp=m;
            while(v2[i].x==v2[j].x && j<cnt2)
            {
                if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i+1,s=0;k<=j;k++)
            {
                if(v2[k].l<=s) continue;
                if(v2[k].l-s<t) {t-=v2[k].l-s;s=v2[k].r;continue;}
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<s+t<<"\n";
                return 0;
            }
            cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<v2[j].r+t<<"\n";
            return 0;
        }
    }
    cout<<"SECOND\n";
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <set>

const int N=100010;

using namespace std;

#define pb push_back
#define sz(x)((x).size())

typedef long long ll;

struct data
{
    int l,r,x;
    data() {}
    data(int l,int r,int x):l(l),r(r),x(x) {}
    bool operator < (const data &a) const
    {
        if(a.x!=x) return x<a.x;
        return l<a.l;
    }
}v1[N],v2[N];

int cnt1,cnt2;

int main()
{
//    freopen("in.txt","r",stdin);
    ll n,m;
    int k;
    set<int> A,B;
    scanf("%I64d%I64d%d",&n,&m,&k);
    for(int i=0;i<k;i++)
    {
        int x1,x2,y1,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(x1==x2) v2[cnt2++]=data(min(y1,y2),max(y1,y2),x1),A.insert(x1);
        else v1[cnt1++]=data(min(x1,x2),max(x1,x2),y1),B.insert(x2);
    }
    sort(v1,v1+cnt1);
    sort(v2,v2+cnt2);
    int a=m-1,b=n-1;
    ll ret=0;
    for(int i=0;i<cnt1;)
    {
        int j=i;
        int tmp=n;
        while(v1[i].x==v1[j].x && j<cnt1)
        {
            if(v1[i].r>v1[j].l) tmp-=v1[j].r-v1[i].r;
            else tmp-=v1[j].r-v1[j].l;
            j++;
        }
        i=j;
        ret^=tmp;
        a--;
    }
    for(int i=0;i<cnt2;)
    {
        int j=i;
        int tmp=m;
        while(v2[i].x==v2[j].x && j<cnt2)
        {
            if(v2[i].r>v2[j].l) tmp-=v2[j].r-v2[i].r;
            else tmp-=v2[j].r-v2[j].l;
            j++;
        }
        i=j;
        ret^=tmp;
        b--;
    }
    if(a&1) ret^=n;
    if(b&1) ret^=m;
    if(ret)
    {
        cout<<"FIRST\n";
        if(a && n-(ret^n)>0)
        {
            for(int i=1;;i++)
            {
                if(!A.count(i))
                {
                    cout<<0<<" "<<i<<" "<<n-(ret^n)<<" "<<i<<endl;
                    return 0;
                }
            }
        }
        if(b && m-(ret^m)>0)
        {
            for(int i=1;;i++)
            {
                if(!B.count(i))
                {
                    cout<<i<<" "<<0<<" "<<i<<" "<<m-(ret^m)<<endl;
                    return 0;
                }
            }
        }
        for(int i=0,j=0;i<cnt1;i=j)
        {
            int tmp=n;
            while(v1[i].x==v1[j].x && j<cnt1)
            {
                if(v1[i].r>v1[j].l) tmp-=v1[j].r-v1[i].r;
                else tmp-=v1[j].r-v1[j].l;
                j++;
            }
            ll t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            if(v1[i].l>=t)
            {
                cout<<"TT"<<endl;
                cout<<0<<" "<<v1[i].x<<" "<<t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            t-=v1[i].l;
            for(int k=i+1;k<=j;k++)
            {
                if(v1[k-1].r>v1[k].l) continue;
                if(v1[k].l-v1[k-1].r<t) {t-=v1[k].l-v1[k-1].r;continue;}
                cout<<0<<" "<<v1[i].x<<" "<<v1[k-1].r+t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            cout<<0<<" "<<v1[i].x<<" "<<v1[j].r+t<<" "<<v1[i].x<<"\n";
            return 0;
        }

        for(int i=0,j=0;i<cnt2;i=j)
        {
            j=i;
            int tmp=m;
            while(v2[i].x==v2[j].x && j<cnt2)
            {
                if(v2[i].r>v2[j].l) tmp-=v2[j].r-v2[i].r;
                else tmp-=v2[j].r-v2[j].l;
                j++;
            }
            ll t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            if(v2[i].l>=t)
            {
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<t<<"\n";
                return 0;
            }
            t-=v2[i].l;
            for(int k=i+1;k<=j;k++)
            {
                if(v2[k-1].r>v2[k].l) continue;
                if(v2[k].l-v2[k-1].r<t) {t-=v2[k].l-v2[k-1].r;continue;}
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<v2[k-1].r+t<<"\n";
                return 0;
            }
            cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<v2[j].r+t<<"\n";
            return 0;
        }
    }
    cout<<"SECOND\n";
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <set>

const int N=100010;

using namespace std;

#define pb push_back
#define sz(x)((x).size())

struct data
{
    int l,r,x;
    data() {}
    data(int l,int r,int x):l(l),r(r),x(x) {}
    bool operator < (const data &a) const
    {
        if(a.x!=x) return x<a.x;
        return l<a.l;
    }
}v1[N],v2[N];

int cnt1,cnt2;

int main()
{
//    freopen("in.txt","r",stdin);
    int n,m;
    int k;
    set<int> A,B;
    scanf("%d%d%d",&n,&m,&k);
    for(int i=0;i<k;i++)
    {
        int x1,x2,y1,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(x1==x2 && (x1==0 || x1==n)) continue;
        if(y1==y2 && (y1==0 || y1==m)) continue;
        if(x1==x2) v2[cnt2++]=data(min(y1,y2),max(y1,y2),x1),A.insert(x1);
        else v1[cnt1++]=data(min(x1,x2),max(x1,x2),y1),B.insert(y1);
    }
    sort(v1,v1+cnt1);
    sort(v2,v2+cnt2);
    int a=m-1,b=n-1;
    int ret=0;
    for(int i=0,s=0;i<cnt1;)
    {
        int j=i;
        int tmp=n;
        while(v1[i].x==v1[j].x && j<cnt1)
        {
            if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        a--;
    }
    for(int i=0,s=0;i<cnt2;)
    {
        int j=i;
        int tmp=m;
        while(v2[i].x==v2[j].x && j<cnt2)
        {
            if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        b--;
    }
    if(a&1) ret^=n;
    if(b&1) ret^=m;
    if(ret)
    {
        cout<<"FIRST\n";
        if(a && n-(ret^n)>0)
        {
            for(int i=1;;i++)
            {
                if(!A.count(i))
                {
                    cout<<0<<" "<<i<<" "<<n-(ret^n)<<" "<<i<<endl;
                    return 0;
                }
            }
        }
        if(b && m-(ret^m)>=0)
        {
            for(int i=1;;i++)
            {
                if(!B.count(i))
                {
                    cout<<i<<" "<<0<<" "<<i<<" "<<m-(ret^m)<<endl;
                    return 0;
                }
            }
        }
        for(int i=0,j=0,s=0;i<cnt1;i=j)
        {
            int tmp=n;
            while(v1[i].x==v1[j].x && j<cnt1)
            {
                if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i;k<=j;k++,s=max(s,v1[k].r))
            {
                if(v1[k].l<=s) continue;
                if(v1[k].l-s<t) {t-=v1[k].l-s;continue;}
                cout<<0<<" "<<v1[i].x<<" "<<s+t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            cout<<0<<" "<<v1[i].x<<" "<<s+t<<" "<<v1[i].x<<"\n";
            return 0;
        }

        for(int i=0,j=0,s=0;i<cnt2;i=j)
        {
            j=i;
            int tmp=m;
            while(v2[i].x==v2[j].x && j<cnt2)
            {
                if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i,s=0;k<=j;k++,s=max(s,v1[k].r))
            {
                if(v2[k].l<=s) continue;
                if(v2[k].l-s<t) {t-=v2[k].l-s;continue;}
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<s+t<<"\n";
                return 0;
            }
            cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<s+t<<"\n";
            return 0;
        }
    }
    cout<<"SECOND\n";
    return 0;
}


#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
#include <vector>
#include <set>

const int N=100010;

using namespace std;

#define pb push_back
#define sz(x)((x).size())

struct data
{
    int l,r,x;
    data() {}
    data(int l,int r,int x):l(l),r(r),x(x) {}
    bool operator < (const data &a) const
    {
        if(a.x!=x) return x<a.x;
        return l<a.l;
    }
}v1[N],v2[N];

int cnt1,cnt2;

int main()
{
//    freopen("in.txt","r",stdin);
    int n,m;
    int k;
    set<int> A,B;
    scanf("%d%d%d",&n,&m,&k);
    for(int i=0;i<k;i++)
    {
        int x1,x2,y1,y2;
        scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
        if(x1==x2 && (x1==0 || x1==n)) continue;
        if(y1==y2 && (y1==0 || y1==m)) continue;
        if(x1==x2) v2[cnt2++]=data(min(y1,y2),max(y1,y2),x1),A.insert(x1);
        else v1[cnt1++]=data(min(x1,x2),max(x1,x2),y1),B.insert(x2);
    }
    sort(v1,v1+cnt1);
    sort(v2,v2+cnt2);
    int a=m-1,b=n-1;
    int ret=0;
    for(int i=0,s=0;i<cnt1;)
    {
        int j=i;
        int tmp=n;
        while(v1[i].x==v1[j].x && j<cnt1)
        {
            if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        a--;
    }
    for(int i=0,s=0;i<cnt2;)
    {
        int j=i;
        int tmp=m;
        while(v2[i].x==v2[j].x && j<cnt2)
        {
            if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
            j++;
        }
        i=j;
        ret^=tmp;
        b--;
    }
    if(a&1) ret^=n;
    if(b&1) ret^=m;
    if(ret)
    {
        cout<<"FIRST\n";
        if(a && n-(ret^n)>0)
        {
            for(int i=1;;i++)
            {
                if(!A.count(i))
                {
                    cout<<0<<" "<<i<<" "<<n-(ret^n)<<" "<<i<<endl;
                    return 0;
                }
            }
        }
        if(b && m-(ret^m)>=0)
        {
            for(int i=1;;i++)
            {
                if(!B.count(i))
                {
                    cout<<i<<" "<<0<<" "<<i<<" "<<m-(ret^m)<<endl;
                    return 0;
                }
            }
        }
        for(int i=0,j=0,s=0;i<cnt1;i=j)
        {
            int tmp=n;
            while(v1[i].x==v1[j].x && j<cnt1)
            {
                if(v1[i].r>s) tmp-=v1[j].r-max(s,v1[j].l),s=v1[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i;k<=j;k++)
            {
                if(v1[k].l<=s) continue;
                if(v1[k].l-s<t) {t-=v1[k].l-s;s=v1[k].r;continue;}
                cout<<0<<" "<<v1[i].x<<" "<<s+t<<" "<<v1[i].x<<"\n";
                return 0;
            }
            cout<<0<<" "<<v1[i].x<<" "<<v1[j].r+t<<" "<<v1[i].x<<"\n";
            return 0;
        }

        for(int i=0,j=0,s=0;i<cnt2;i=j)
        {
            j=i;
            int tmp=m;
            while(v2[i].x==v2[j].x && j<cnt2)
            {
                if(v2[i].r>s) tmp-=v2[j].r-max(s,v2[j].l),s=v2[j].r;
                j++;
            }
            int t =tmp^ret;
            if(tmp<t) continue;
            t=tmp-t;
            for(int k=i,s=0;k<=j;k++)
            {
                if(v2[k].l<=s) continue;
                if(v2[k].l-s<t) {t-=v2[k].l-s;s=v2[k].r;continue;}
                cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<s+t<<"\n";
                return 0;
            }
            cout<<v2[i].x<<" "<<0<<" "<<v2[i].x<<" "<<v2[j].r+t<<"\n";
            return 0;
        }
    }
    cout<<"SECOND\n";
    return 0;
}