#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int arr[n];
    int z = 0;
    long long sum = 0;
    map<int,int> m;

    for(int i = 0 ; i < n ; i++)
    {
        cin >> arr[i];
        ++m[arr[i]];
        sum += arr[i] - i;
        if(arr[i] == 0)
        z++;
    }
    if(n - m.size() > 1)
    {
        cout << "cslnb" << endl;
        return 0;
    }
    if(m.find(0) != m.end())
    {
        if(m[0] > 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    for(auto x : m)
    {
        if(x.second > 1 && m.find(x.first - 1) != m.end())
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    if(sum % 2 == 1)
    cout << "sjfnb" << endl;
    else
    cout << "cslnb" << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int arr[n];
    int z = 0;

    for(int i = 0 ; i < n ; i++)
    {
        cin >> arr[i];
        if(arr[i] == 0)
        z++;
    }
    if(z > 1)
    {
        cout << "cslnb" << endl;
        return 0;
    }
    sort(arr,arr+n);

    if(n == 2)
    {
        if(arr[0] == 0 && arr[1] == 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    for(int i = 2 ; i < n ; i++)
    {
        if(arr[i] == arr[i-1] && arr[i-1] == arr[i-2])
        {
            cout << "cslnb" << endl;
            return 0;
        }
        if(arr[i] == arr[i-1] && arr[i-1] - arr[i-2] == 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
        if(i > 2)
        {
            if(arr[i] == arr[i-1] && arr[i-2] == arr[i-3])
            {
                cout << "cslnb" << endl;
                return 0;
            }
        }
    }
    int x = 0;
    for(int i = 0 ; i < n ; i++)
    {
        x = x ^ (arr[i]+i);
    }
    if(x != 0)
    cout << "sjfnb" << endl;
    else
    cout << "cslnb" << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int arr[n];
    int z = 0;
    long long sum = 0;
    map<int,int> m;

    for(int i = 0 ; i < n ; i++)
    {
        cin >> arr[i];
        //sum += arr[i] - i;
        if(arr[i] == 0)
        z++;
    }
    if(z > 1)
    {
        cout << "cslnb" << endl;
        return 0;
    }
    sort(arr,arr+n);

    if(n == 1)
    {
        if(arr[0] == 0)
        cout << "cslnb" << endl;
        return 0;
    }
    if(n == 2)
    {
        if(arr[0] == 0 && arr[1] == 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    int f = 0;
    for(int i = 2 ; i < n ; i++)
    {
        if(arr[i] == arr[i-1] && arr[i-1] == arr[i-2])
        {
            cout << "cslnb" << endl;
            return 0;
        }
        if(arr[i] == arr[i-1] && arr[i-1] - arr[i-2] == 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
        if(i > 2)
        {
            if(arr[i-1] == arr[i-2] || arr[i] == arr[i-1])
            {
                f++;
                if(f == 2)
                {
                    cout << "cslnb" << endl;
                    return 0;
                }
            }
        }
    }
    for(int i = 0 ; i < n ; i++)
    {
        sum += arr[i] - i;
    }
    if(sum % 2 == 1)
    cout << "sjfnb" << endl;
    else
    cout << "cslnb" << endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back

int main()
{
    ll n;
    cin >> n;
    ll arr[n];
    ll x = 0;

    for(int i = 0 ; i < n ; i++)
    {
        cin >> arr[i];
        x = x ^ arr[i];
    }
    if(n == 1)
    {
        if(arr[0] % 2 == 0)
        {
            cout << "cslnb" << endl;
        }
        else
        {
            cout << "sjfnb" << endl;
        }
        return 0;
    }
    sort(arr,arr+n);

    int z = 0, o = 0;
    for(int i = 0 ; i < n ; i++)
    {
        if(arr[i] == 0)
        z++;
        if(arr[i] == 1)
        o++;
    }
    if(z == n)
    {
        cout << "cslnb" << endl;
        return 0;
    }
    if(z+o == n && n >= 3)
    {
         cout << "cslnb" << endl;
         return 0;
    }
    for(int i = 0 ; i < n-2 ; i++)
    {
        if(arr[i] == arr[i+1] && arr[i+1] == arr[i+2])
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    if(x == 0)
    {
        cout << "sjfnb" << endl;
    }
    else
    {
        cout << "cslnb" << endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back

int main()
{
    int n;
    cin >> n;
    ll arr[n];
    int x = 0;

    for(int i = 0 ; i < n ; i++)
    {
        cin >> arr[i];
        x = x ^ arr[i];
    }
    if(n == 1)
    {
        if(arr[0] % 2 == 0)
        {
            cout << "cslnb" << endl;
        }
        else
        {
            cout << "sjfnb" << endl;
        }
        return 0;
    }
    sort(arr,arr+n);

    for(int i = 0 ; i < n-2 ; i++)
    {
        if(arr[i] == arr[i+1] && arr[i+1] == arr[i+2])
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    if(x == 0)
    {
        cout << "sjfnb" << endl;
    }
    else
    {
        cout << "cslnb" << endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int arr[n];
    int z = 0;
    long long sum = 0;

    for(int i = 0 ; i < n ; i++)
    {
        cin >> arr[i];
        sum += arr[i];
        if(arr[i] == 0)
        z++;
    }
    if(z > 1)
    {
        cout << "cslnb" << endl;
        return 0;
    }
    sort(arr,arr+n);

    if(n == 1)
    {
        if(arr[0] == 0)
        cout << "cslnb" << endl;
        return 0;
    }
    if(n == 2)
    {
        if(arr[0] == 0 && arr[1] == 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
    }
    for(int i = 2 ; i < n ; i++)
    {
        if(arr[i] == arr[i-1] && arr[i-1] == arr[i-2])
        {
            cout << "cslnb" << endl;
            return 0;
        }
        if(arr[i] == arr[i-1] && arr[i-1] - arr[i-2] == 1)
        {
            cout << "cslnb" << endl;
            return 0;
        }
        if(i > 2)
        {
            if(arr[i] == arr[i-1] && arr[i-2] == arr[i-3])
            {
                cout << "cslnb" << endl;
                return 0;
            }
        }
    }
    sum = sum - ((n * (n-1L)) / 2L);
    if(sum % 2 != 0)
    cout << "sjfnb" << endl;
    else
    cout << "cslnb" << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void cslnb() {
    cout << "cslnb" << endl;
    exit(0);
}

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    map<int, int> mp;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        mp[v[i]]++;
    }
    int ct = 0;
    for (auto x: mp) {
        if (x.second > 2 or x.second == 2 and mp[x.second - 1] > 0) {
            cslnb();
        }
        if (x.second == 2)ct++;
        if (x.second == 2 and x.first == 0) {
            cslnb();
        }
    }
    if (ct > 1) {
        cslnb();
    }
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        if(zp < 0){
            cslnb();
        }
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if (!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void cslnb() {
    cout << "cslnb" << endl;
    exit(0);
}

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        if(zp <= 0){
            cslnb();
        }
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if (!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    map<int, int> mp;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        mp[v[i]]++;
    }
    for (auto x: mp) {
        if (x.second > 2 or x.second == 2 and mp[x.second - 1] > 0) {
            cout << "cslnb" << endl;
            return;
        }
    }
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if(!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void cslnb() {
    cout << "cslnb" << endl;
    exit(0);
}

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    for (int i = 0; i < n; i++)cin >> v[i];
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        if (zp <= 0) {
            cslnb();
        }
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if (!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void cslnb() {
    cout << "cslnb" << endl;
    exit(0);
}

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    map<int, int> mp;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        mp[v[i]]++;
    }
    int ct = 0;
    for (auto x: mp) {
        if (x.second > 2 or x.second == 2 and mp[x.second - 1] > 0) {
            cslnb();
        }
        if (x.second == 2)ct++;
        if (x.second == 2 and x.first == 0) {
            cslnb();
        }
    }
    if (ct > 1) {
        cslnb();
    }
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if (!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void cslnb() {
    cout << "cslnb" << endl;
    exit(0);
}

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    map<int, int> mp;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        mp[v[i]]++;
    }
    int ct = 0;
    for (auto x: mp) {
        if (x.second > 2 or (x.second == 2 and mp[x.first - 1] > 0)) {
            cslnb();
        }
        if (x.second == 2)ct++;
        if (x.second == 2 and x.first == 0) {
            cslnb();
        }
    }
    if (ct > 1) {
        cslnb();
    }
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        if(zp < 0){
            cslnb();
        }
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if (!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define int long long
#define endl '\n'
#define maxn 100010
const int MOD = 1000000007;

void solve() {
    int n;
    cin >> n;

    vector<int> v(n);
    map<int, int> mp;
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
        mp[v[i]]++;
    }
    int ct = 0;
    for (auto x: mp) {
        if (x.second > 2 or x.second == 2 and mp[x.second - 1] > 0) {
            cout << "cslnb" << endl;
            return;
        }
        if (x.second == 2)ct++;
    }
    if (ct > 1) {
        cout << "cslnb" << endl;
        return;
    }
    sort(v.begin(), v.end());
    int tot = 0;
    for (int i = 0; i < v.size(); i++) {
        int zp = v[i] - i;
        zp %= 2;
        if (zp)tot ^= 1;
    }
    if (!tot)cout << "cslnb" << endl;
    else cout << "sjfnb" << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int t = 1;
//    cin >> t;

    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
        //  if(a[i])
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
         if(a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
    cout<<"cslnb";
    return 0;
         }
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];

int main()
{
     ios_base::sync_with_stdio(false);
     ll n,t,m,k,x,y;
     cin>>n;
     fr(i,0,n)cin>>a[i];
     sort(a,a+n);
     ll f=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
    }
    if(s.size()<n-1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);

     fr(i,0,n-1)
     {
         if(a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
        cout<<"cslnb";
            return 0;
         }
     }
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
         if(a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
    cout<<"cslnb";
    return 0;
         }
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         }
         if(s.size()<n-1)
         {
             f=-1;
         cout<<"cslnb";
            return 0;
         }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=max(a[i]-i,(ll)0);
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n-1)
     {
         if(a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
    cout<<"cslnb";
    return 0;
         }
     }
     fr(i,0,n)
     {
         x+=a[i]-i;
         if(a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
    cout<<"cslnb";
    return 0;
         }
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];

int main()
{
     ios_base::sync_with_stdio(false);
     ll n,t,m,k,x,y;
     cin>>n;
     fr(i,0,n)cin>>a[i];
     sort(a,a+n);
     reverse(a,a+n);
     ll f=0;
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n-1)
     {
        //  cout<<a[i]<<a[i+1]<<endl;
         if(a[i]==a[i-1] && a[i]-1==a[i+1])
         {
             f=-1;
            cout<<"cslnb";
            return 0;
         }
     }
     fr(i,0,n)
     {
         x+=a[i]-i;
         if(a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
    cout<<"cslnb";
    return 0;
         }
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);

     fr(i,0,n-1)
     {
         if( i>0 && a[i]==a[i+1] && a[i]-1==a[i-1])
         {
             f=-1;
        cout<<"cslnb";
            return 0;
         }
     }
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;

     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];
set<ll> s;

int main()
{
     ios_base::sync_with_stdio(false);
     ll f=0;
     ll n,t,m,k,x,y;
     cin>>n;
     x=0;
     fr(i,0,n)
     {
         cin>>a[i];
         s.insert(a[i]);
         if(a[i]==0)
         x++;
    }
    if(s.size()<n-1 || x>1)
    {
        f=-1;
    cout<<"cslnb";
    return 0;
    }
     sort(a,a+n);
     reverse(a,a+n);
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
         if(a[i])
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fr(g,f,h) for(ll g=f;g<h;g++)
#define br(g,f,h) for(ll g=f;g<h;g--)
#define all(v) v.begin(),v.end()
#define new cout<<endl
ll mod(ll x)
{
     if(x<0)
         return -x;
     return x;
 }
ll expo(ll x,ll y)
{
     ll res = 1;
     while(y>0)
    {
     if(y%2==1)
         res = (res*x);
     y=y>>1;
     x=x*x;
    }
     return res;
}
using namespace std;
 const int MAXN = 500005;
vector<ll> v;
ll a[1000000],b[1000000];

int main()
{
     ios_base::sync_with_stdio(false);
     ll n,t,m,k,x,y;
     cin>>n;
     fr(i,0,n)cin>>a[i];
     sort(a,a+n);
     ll f=0;
     x=0;
     fr(i,0,n)
     {
         x+=a[i]-i;
     }
     if(x%2==0)
     {
         f=-1;
     }
     else{
         f=1;
     }

     if(f==1)
     {
         cout<<"sjfnb";
     }
     else if(f==-1)
     {
         cout<<"cslnb";
     }

     return 0;
}


#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#include <bits/stdc++.h>
#define pll pair<ll,ll>
#define ll long long
#define S second
#define F first
using namespace std;
ll n,id,sum;
ll a[200009];
unordered_map<ll,ll>mp;
void out(int num){
	if(num == 1) cout<<"sjfnb\n",exit(0);
	if(num == 2) cout<<"cslnb\n",exit(0);
}
int main(){
	fast,cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		mp[a[i]]++;
	}
	sort(a,a+n);bool z=0;
	for(int i=0;i<n-1;i++){
		if(a[i] == a[i+1]){
			if(z == 0) id = i,z = 1;
			else out(2);
		}
		if(a[i] < i) out(2);
		sum += a[i] - i;
	}
	if(a[n-1] < n-1) out(2);
	sum += a[n-1]-n+1;
	if(mp[a[id]-1]) out(2);
	out((sum%2 ? 1 : 2));
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
using namespace std;
ll n,ans;
ll arr[100009];
int main(){
	cin>>n;
	for(int i=0;i<n;i++) cin>>arr[i];
	sort(arr,arr+n);
	if(arr[0] == 0){
		bool z = 0;
		for(int i=1;i<n;i++){
			if(arr[i]-arr[i-1] > 1) z = 1;
		}
		if(z == 0) cout<<"cslnb"<<endl,exit(0);
	}
	ll t = 0,i = 0;
	while(arr[i] == 0) i++;
	if(i != 0) t++;
	for( ;i<n;i++){
		ll x = arr[i] - t++;
		ans = (ans + x) % 2;
	}
	if(ans == 1) cout<<"sjfnb"<<endl;
	else cout<<"cslnb"<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
using namespace std;
ll n,ans;
ll arr[100009];
int main(){
	cin>>n;
	for(int i=0;i<n;i++) cin>>arr[i];
	sort(arr,arr+n);
	ll t = 0;
	for(int i=0;i<n;i++){
		if(arr[i] <= t){t=arr[i]+1;continue;}
		ll x = arr[i] - t++;
		ans = (ans + x) % 2;
	}
	if(ans == 1) cout<<"sjfnb"<<endl;
	else cout<<"cslnb"<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
using namespace std;
ll n,ans;
ll arr[100009];
int main(){
	cin>>n;
	for(int i=0;i<n;i++) cin>>arr[i];
	sort(arr,arr+n);
	if(arr[0] == 0){
		bool z = 0;
		for(int i=1;i<n;i++){
			if(arr[i]-arr[i-1] > 1) z = 1;
		}
		if(z == 0) cout<<"cslnb"<<endl,exit(0);
	}
	ll t = 0;
	for(int i=0;i<n;i++){
		while(arr[i] < t){}
		ll x = arr[i] - t++;
		ans = (ans + x) % 2;
	}
	if(ans == 1) cout<<"sjfnb"<<endl;
	else cout<<"cslnb"<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
using namespace std;
ll n,ans;
ll arr[100009];
int main(){
	cin>>n;
	for(int i=0;i<n;i++) cin>>arr[i];
	sort(arr,arr+n);
	if(arr[0] == 0){
		bool z = 0;
		for(int i=1;i<n;i++){
			if(arr[i]-arr[i-1] > 1) z = 1;
		}
		if(z == 0) cout<<"cslnb"<<endl,exit(0);
	}
	ll t = 0;
	for(int i=0;i<n;i++){
		ll x = arr[i] - t++;
		ans = (ans + x) % 2;
	}
	if(ans == 1) cout<<"sjfnb"<<endl;
	else cout<<"cslnb"<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
using namespace std;
ll n,ans;
ll arr[100009];
int main(){
	cin>>n;
	for(int i=0;i<n;i++) cin>>arr[i];
	sort(arr,arr+n);
	bool z = 0;
	for(int i=1;i<n;i++){
		if(arr[i]-arr[i-1] > 1) z = 1;
	}
	if(z == 0) cout<<"cslnb"<<endl,exit(0);
	ll t = 0;
	for(int i=0;i<n;i++){
		ll x = arr[i] - t++;
		ans = (ans + x) % 2;
	}
	if(ans == 1) cout<<"sjfnb"<<endl;
	else cout<<"cslnb"<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
using namespace std;
ll n,ans;
ll arr[100009];
int main(){
	cin>>n;
	for(int i=0;i<n;i++) cin>>arr[i];
	sort(arr,arr+n);
	if(arr[0] == 0){
		bool z = 0;
		for(int i=1;i<n;i++){
			if(arr[i]-arr[i-1] > 1) z = 1;
		}
		if(z == 0) cout<<"cslnb"<<endl,exit(0);
	}
	ll t = 0,i = 0;
	while(arr[i] == 0) i++;
	if(i != 0) t++;
	for( ;i<n;i++){
		while(t > arr[i]){

		}
		ll x = arr[i] - t++;
		ans = (ans + x) % 2;
	}
	if(ans == 1) cout<<"sjfnb"<<endl;
	else cout<<"cslnb"<<endl;
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k,l;
    long long s=0;
    set< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end()){
            a++;
            l=k-1;
        }
        else
            m.insert(k);
    }
    if(m.find(l)!=m.end() || l==-1)
        a++;
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k;
    long long s=0;
    map< long int,int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end())
            a++;
        else
            m[k]=1;
    }
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k;
    long long s=0;
    multiset< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end())
            a++;
        else
            m.insert(k);
    }
    vector< long int > v(m.begin(),m.end());
    for(i=0;i<n;i++){
        if(v[i]<i)
            a=2;
    }
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k;
    long long s=0;
    map< long int,int > m;
    for(i=0;i<n;i++){
            cin>>k;
            s=s+k;
        if(m.find(k)!=m.end()){
               // cout<<"nnnnnnnnnnn"<<m[k]<<"    ";
            if(m[k]==1)
                m[k]=2;
            else if(m[k]==2){
                a=1;
                break;
            }
        }
        else
            m[k]=1;
    }
    if(a==1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k,l;
    long long s=0;
    set< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end()){
            a++;
            l=k-1;
            if(m.find(l)!=m.end() || k==0)
                a++;
        }
        else
            m.insert(k);
    }
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k,l;
    long long s=0;
    set< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end()){
            a++;
            l=k-1;
            if(m.find(l)!=m.end())
                a++;
        }
        else
            m.insert(k);
    }
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k,l;
    long long s=0;
    set< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end()){
            a++;
            l=k-1;
        }
        else
            m.insert(k);
    }
    if(m.find(l)!=m.end() || k==0)
        a++;
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k;
    long long s=0;
    multiset< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end())
            a++;
            m.insert(k);
    }
    vector< long int > v(m.begin(),m.end());
    for(i=0;i<n;i++){
      //  cout<<v[i]<<"  ";
        if(v[i]<i)
            a=2;
    }
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<bits/stdc++.h>

using namespace std;

int main(){
    int n,i,c,a=0;
    cin>>n;
    long int k;
    long long s=0;
    multiset< long int > m;
    for(i=0;i<n;i++){
        cin>>k;
        s=s+k;
        if(m.find(k)!=m.end())
            a++;
            m.insert(k);
    }
    vector< long int > v(m.begin(),m.end());
    for(i=0;i<n;i++){
        cout<<v[i]<<"  ";
        if(v[i]<i)
            a=2;
    }
    if(a>1)
        cout<<"cslnb";
    else{
       s=s-n*(n-1)/2;
       if(s%2==1)
            cout<<"sjfnb";
       else
            cout<<"cslnb";
    }
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
ll a[100005];
int main(void) {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0, p = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x =i - 2;
				if (t > 2)p++;
			}
		}
		ma = max(ma, t);
		if (t >= 2)q++;
		if (t == 2 && x == -1 && n >= 3)x = n - 2;
		if (ma >= 3 || q > 1 || w >= 2 || (x != -1 && a[x] == a[x - 1] + 1) || p) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
int main(void) {
	int n;
	while (cin >> n) {
		ll a[100005];
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, x = -1;
		for (int i = 0; i < n; i++) {
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x = (ll)i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2)x = (ll)(n - 1);
		if (ma >= 3 || q > 1 || ( x!= -1 && a[x] == a[x - 1] + 1)) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
int main(void) {
	int n;
	while (cin >> n) {
		ll a[100005];
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0;
		for (int i = 0; i < n; i++) {
			if(a[i]>i)
				sum += a[i] - i;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
ll a[100005];
int main(void) {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x =i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2 && x == -1 && n >= 3)x = n - 2;
		if (ma >= 3 || q > 1 || (x != -1 && a[x] == a[x - 1] + 1) || w >= 2) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
ll a[100005];
int main(void) {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x =i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2 && x == -1 && n >= 2)x = n - 2;
		if (ma >= 3 || q > 1 || (x != -1 && a[x] == a[x - 1] + 1) || w >= 2) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}////


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
ll a[100005];
int main(void) {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x =i - 2;
			}
		}
		ma = max(ma, t);
		if (t >= 2)q++;
		if (t == 2 && x == -1 && n >= 3)x = n - 2;
		if (ma >= 3 || q > 1 || (x != -1 && a[x] == a[x - 1] + 1) || w >= 2) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
int main(void) {
	int n;
	while (cin >> n) {
		ll a[100005];
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, x = -1, w = 0;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x = (ll)i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2)x = (ll)(n - 1);
		if (ma >= 3 || q > 1 || ( x!= -1 && a[x] == a[x - 1] + 1) || w >= 2) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
int main(void) {
	int n;
	while (cin >> n) {
		ll a[100005];
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, x = -1;
		for (int i = 0; i < n; i++) {
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x = (ll)i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2)x = ll(n - 1);
		if (ma >= 3 || q > 1 || ( x!= -1 && a[x] == a[x - 1] + 1)) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
ll a[100005];
int main(void) {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0, p = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				if (t == 2 && n >= 3)x =i - 2;
				t = 1;
				if (t > 2)p++;
			}
		}
		ma = max(ma, t);
		if (t >= 2)q++;
		if (t == 2 && x == -1 && n >= 3)x = n - 2;
		if (ma >= 3 || q > 1 || w >= 2 || (x != -1 && x && a[x] == a[x - 1] + 1) || p) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
int main(void) {
	int n;
	while (cin >> n) {
		ll a[100005];
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x =i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2 && x == -1)x = n - 2;
		if (ma >= 3 || q > 1 || ( x!= -1 && a[x] == a[x - 1] + 1) || w >= 2) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
ll a[100005];
int main(void) {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0, p = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				if (t == 2)x =i - 2;
				t = 1;
				if (t > 2)p++;
			}
		}
		ma = max(ma, t);
		if (t >= 2)q++;
		if (t == 2 && x == -1 && n >= 3)x = n - 2;
		if (ma >= 3 || q > 1 || w >= 2 || (x != -1 && a[x] == a[x - 1] + 1) || p) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include<algorithm>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;
#define ll long long
int main(void) {
	int n;
	while (cin >> n) {
		ll a[100005];
		for (int i = 0; i < n; i++)cin >> a[i];
		sort(a, a + n);
		ll sum = 0, t = 1, ma = 0, q = 0, w = 0;
		int x = -1;
		for (int i = 0; i < n; i++) {
			if (a[i] == 0)w++;
			if(a[i]>i)
				sum += a[i] - i;
			if (i && a[i] == a[i - 1])t++;
			if(i && a[i] != a[i - 1]) {
				if (t >= 2)q++;
				ma = max(t, ma);
				t = 1;
				if (t == 2)x =i - 2;
			}
		}
		ma = max(ma, t);
		if (t == 2)x = n - 2;
		if (ma >= 3 || q > 1 || ( x!= -1 && a[x] == a[x - 1] + 1) || w >= 2) {
			cout << "cslnb" << endl;
			continue;
		}
		if (sum % 2 != 0) {
			cout << "sjfnb" << endl;
		}
		else cout << "cslnb" << endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a[n];

    string one ="sjfnb";
    string two="cslnb";
    for(int i=0;i<n;i++)
    cin >> a[i];

    sort(a,a+n,greater<int>());

    if(n==1)
    {
        if(a[0]%2==0)
        {
            cout << two;
        }

        else
        cout << one;

        return 0;
    }

    if(n==2)
    {
        if(a[1]==0 && a[0]==0)
        cout << one;

        else
        {
            if((a[0]+a[1]-1)%2==0)
            cout << two;

            else
            cout << one;
        }

        return 0;
    }
    int zero=0;
    for(int i=0;i<n;i++)
    {
        if(a[0]!=0)
        {
            zero=1;
            break;
        }
    }

    if(zero==0)
    {
        cout << two;
        return 0;
    }

    int flag=0;
    int moves=0;

    for(int i=1;i<n;i++)
    {
        if(a[i]>0 && a[i]==a[i-1])
        {
            if(flag==0)
            {
                flag=1;
                a[i]--;
                moves=1;
            }

            else
            {
                cout << two ;
                return 0;
            }
        }
    }

    for(int i=0;i<n;i++)
    {
        if(a[i]==a[i-1])
        {
            cout << two;
            return 0;
        }
    }

    int ans[n];

    for(int i=0;i<n;i++)
    {
        ans[i]=n-1-i;
    }

    for(int i=0;i<n;i++)
    moves+=a[i]-ans[i];

    if(moves%2==0)
    {
        cout << two;
    }

    else
    cout << one;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
	ll n;
	cin >> n;

	string one="cslnb";
	string two="sjfnb";

	ll arr[n];
	for(ll i=0;i<n;i++)
	cin >> arr[i];

	sort(arr,arr+n);

	ll flag=0;
	for(ll i=1;i<n;i++)
	{
		if(arr[i]<i)
		{
			cout << one;
			return 0;
		}

		if(arr[i]==arr[i-1])
		{
			arr[i-1];
			if(flag==0)
			{
				flag=1;
			}

			else
			{
				cout << one;
				return 0;
			}
		}
	}

	for(ll i=1;i<n;i++)
	{
		if(arr[i]==arr[i-1])
		{cout << one; return 0;}
	}

	ll sum=0;

	for(ll i=0;i<n;i++)
	{
		sum+=arr[i]-i;
	}

	if(sum%2==0)
	{
		if(flag==0)
		cout << one;

		else
		cout << two;
	}

	else if(flag==0)
	cout << two;

	else
	cout << one;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a[n];

    string one ="sjfnb";
    string two="cslnb";
    for(int i=0;i<n;i++)
    cin >> a[i];

    sort(a,a+n,greater<int>());

    if(n==1)
    {
        if(a[0]%2==0)
        {
            cout << two;
        }

        else
        cout << one;

        return 0;
    }

    if(n==2)
    {
        if(a[1]==0 && a[0]==0)
        cout << one;

        else
        {
            if((a[0]+a[1]-1)%2==0)
            cout << two;

            else
            cout << one;
        }

        return 0;
    }
    int zero=0;
    for(int i=0;i<n;i++)
    {
        if(a[0]!=0)
        {
            zero=1;
            break;
        }
    }

    if(zero==0)
    {
        cout << one;
        return 0;
    }

    int flag=0;
    int moves=0;

    for(int i=1;i<n;i++)
    {
        if(a[i]>0 && a[i]==a[i-1])
        {
            if(flag==0)
            {
                flag=1;
                a[i]--;
                moves=1;
            }

            else
            {
                cout << two ;
                return 0;
            }
        }
    }

    for(int i=0;i<n;i++)
    {
        if(a[i]==a[i-1])
        {
            cout << two;
            return 0;
        }
    }

    int ans[n];

    for(int i=0;i<n;i++)
    {
        ans[i]=n-1-i;
    }

    for(int i=0;i<n;i++)
    moves+=a[i]-ans[i];

    if(moves%2==0)
    {
        cout << two;
    }

    else
    cout << one;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
	ll n;
	cin >> n;

	string one="cslnb";
	string two="sjfnb";

	ll arr[n];
	for(ll i=0;i<n;i++)
	cin >> arr[i];

	sort(arr,arr+n);

	ll flag=0;
	for(ll i=1;i<n;i++)
	{
		if(arr[i]<i)
		{
			cout << one;
			return 0;
		}

		if(arr[i]==arr[i-1])
		{
			arr[i-1]--;
			if(flag==0)
			{
				flag=1;
			}

			else
			{
				cout << one;
				return 0;
			}
		}
	}

	for(ll i=1;i<n;i++)
	{
		if(arr[i]==arr[i-1])
		{cout << one; return 0;}
	}

	ll sum=0;

	for(ll i=0;i<n;i++)
	{
		sum+=arr[i]-i;
	}

	//cout << sum << ' ' << flag << endl;

	if(sum%2==0)
	{
		if(flag==0)
		cout << one;

		else
		cout << two;
	}

	else if(flag==0)
	cout << two;

	else
	cout << one;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a[n];

    string one ="sjfnb";
    string two="cslnb";
    for(int i=0;i<n;i++)
    cin >> a[i];

    sort(a,a+n,greater<int>());

    if(n==1)
    {
        if(a[0]%2==0)
        {
            cout << two;
        }

        else
        cout << one;

        return 0;
    }

    if(n==2)
    {
        if(a[1]==0 && a[0]==0)
        cout << one;

        else
        {
            if((a[0]+a[1]-1)%2==0)
            cout << two;

            else
            cout << one;
        }

        return 0;
    }

    int flag=0;
    int moves=0;
    for(int i=1;i<n;i++)
    {
        if(a[i]==a[i-1])
        {
            if(flag==0)
            {
                flag=1;
                a[i]--;
                moves=1;
            }

            else
            {
                cout << two ;
                return 0;
            }
        }
    }

    if(flag==1){
    for(int i=0;i<n;i++)
    {
        if(a[i]==a[i-1])
        {
            cout << two;
            return 0;
        }
    }}

    int ans[n];

    for(int i=0;i<n;i++)
    {
        ans[i]=n-1-i;
    }

    for(int i=0;i<n;i++)
    moves+=a[i]-ans[i];

    if(moves%2==0)
    {
        cout << two;
    }

    else
    cout << one;
}


#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
long double eps = 0.000000001;
int k, n, q;

struct p{
    long double w[11];
    void print () {
        for ( int i = 0 ; i < k ; i ++ ) {
            cout << w[i] << ", ";
        }
        cout << "\n";
    }
};
long double wx[16], wy[16], maxL[16];

p f[(1<<20)], cev;
int a[(1<<20)];

struct v {
    p crr, maxC, minC;
    int l, r, par;
    long long sum, cx;

    v () {
        l = 0;
        r = 0;
        par = 0;
        sum = 0;
        for ( int i = 0 ; i < k ; i ++ ) {
            maxC.w[i] = -1LL<<32;
            minC.w[i] = 1LL<<32;
        }
    }

}tr[(1<<17)];

int sz = 1, root = 0;

int add ( int cV, p &c, int x, int d ) {
    if ( cV == 0 ) {
        tr[sz].crr = c;
        tr[sz].sum = x;
        tr[sz].cx = x;
        tr[sz].minC = c;
        tr[sz].maxC = c;

        return sz ++;
    }
    tr[cV].sum += x;
    for ( int i = 0 ; i < k ; i ++ ) {
        tr[cV].minC.w[i] = min( tr[cV].minC.w[i], c.w[i] );
        tr[cV].maxC.w[i] = max( tr[cV].maxC.w[i], c.w[i] );
    }
    long double cw = c.w[ d%k ], nw = tr[cV].crr.w[d%k];

    if ( cw <= nw ) {
        tr[cV].l = add ( tr[cV].l, c, x, d+1 );
        tr[ tr[cV].l ].par = cV;
    }else {
        tr[cV].r = add ( tr[cV].r, c, x, d+1 );
        tr[ tr[cV].r ].par = cV;
    }
    return cV;
}
bool oktoget( int cv, p &cp, double t ) {
    for ( int i = 0 ; i < k ; i ++ ) {
        if ( cp.w[i] -maxL[i]*t <= eps + tr[cv].minC.w[i] && tr[cv].maxC.w[i]-eps <= cp.w[i]+maxL[i]*t ) {}
        else { return 0; }
    }
    return 1;
}
bool isin ( p a, p b, long double t ) {
    for ( int i = 0 ; i < k ; i ++ ) {
        if ( b.w[i] -maxL[i]*t <= eps + a.w[i] && a.w[i]-eps <= b.w[i]+maxL[i]*t ) {}
        else { return 0; }
    }
    return 1;
}

long long getSum ( int cV, p &c, int d,long double t) {
    if ( cV == 0 ) { return 0; }
    if ( oktoget ( cV, c,t  ) ) { return tr[cV].sum; }

    long double s = c.w[ d%k ] - maxL[ d%k ]*t, m = tr[cV].crr.w[ d%k ], f =  c.w[ d%k ] + maxL[ d%k ]*t;

    int ret = 0;
    if ( isin ( tr[cV].crr, c, t ) ) { ret += tr[cV].cx; }
    if ( s <= eps + m ) { ret += getSum ( tr[cV].l, c, d+1, t ); }
    if ( m-eps <= f ) { ret += getSum ( tr[cV].r, c, d+1, t ); }

    return ret;
}

long double cross ( long double x1, long double y1, long double x2, long double y2 ) {
    return x1*y2 - x2*y1;
}
long double crossS ( long double x1, long double y1, long double x2, long double y2 ) {
    long double ret = cross( x1, y1, x2, y2 );
    if ( ret < -eps ) { return -1; }
    if ( ret > eps ) { return 1; }
    return 0;
}
long double len ( long double x, long double y ) {
    return sqrt ( x*x + y*y );
}
long double getDist ( long double dx, long double dy, long double x, long double y ){
    long double dxP = -dy/len(dx, dy), dyP = dx/len(dx, dy);
    long double l = -(1LL<<32), r = (1LL<<32), ml = l +(r-l)/3, mr = r- (r-l)/3;

    for ( int kk = 0 ; kk < 120 ; kk ++ ) {
        ml = l +(r-l)/3;
        mr = r- (r-l)/3;

//        cout << l << " " << ml << " " << mr << " " << r << "\n";

        if ( abs( cross( x+dxP*ml, y+dyP*ml, dx, dy ) ) < abs( cross( x+dxP*mr, y+dyP*mr, dx, dy ) ) ) {
            r = mr;
        }else {
            l = ml;
        }
    }

    return (l+r)/2;
}
double getMaxL ( double dx, double dy, double sumX, double sumY, int ind ) {
    if ( ind == k ) { return getDist( dx, dy, sumX, sumY ); }
    return max( getMaxL( dx, dy, sumX+wx[ind], sumY+wy[ind], ind+1 ), getMaxL( dx, dy, sumX-wx[ind], sumY-wy[ind], ind+1 ) );
}

void printTr ( int ind ) {
    if ( ind == 0 ) { cout << "<-\n"; return; }
    tr[ind].crr.print();
    printTr ( tr[ind].l );
    printTr ( tr[ind].r );
}

int main () {
    cout << setprecision( 12 );
//    cout << getDist ( 2, 0, -2, 0 ) << "\n";

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    for ( int i = 0 ; i < k ; i ++ ) {
        maxL[i] = getMaxL( wx[i], wy[i], 0, 0, 0 );
    }

//    for ( int i = 0 ; i < k ; i ++ ) { cout << maxL[i] << " "; } cout << "\n";

    for ( int i = 0 ; i < n ; i ++ ) {

        double x, y;
        cin >> x >> y >> a[i];
        for ( int j = 0 ; j < k ; j ++ ) {
            f[i].w[j] = getDist ( wx[j], wy[j], x, y );
        }

        root = add ( root, f[i], a[i], 0 );
    }

//    printTr ( root );

    for ( int i = 0 ; i < q ; i ++ ) {
        double x, y, t;
        cin >> x >> y >> t;
        for ( int kk = 0 ; kk < k ; kk ++ ) {
            cev.w[kk] = getDist( wx[kk], wy[kk], x, y );
        }
        cout << getSum( root, cev, 0, t ) << "\n";
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};
p operator + ( p a, p b ) {
    return p ( a.x + b.x, a.y + b.y );
}
p operator * ( p a, long long x ) {
    return p ( a.x*x, a.y*x );
}

struct ev {
    long long x, y;
    long long t, ind, cnt;
    ev ( p c = p() , long long cnt_ = 0, long long t_ = 0, long long ind_ = 0 ) {
        x = c.x;
        y = c.y;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

long long n, k, q;
long long wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)], acnt[(1<<20)], t[(1<<20)];

struct ver {
    long long lind, rind, sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];
long long sz = 1;

void add ( long long x, long long num, long long l = (-1LL<<50), long long r = ( 1LL<<50 ), long long ind = 0 ) {
    if ( l == x && r == x+1 ) {
        it[ind].sum += num;
        return;
    }
    if ( r <= x || x+1 <= l ) { return; }

    if ( it[ind].lind == -1 ) {
        it[sz] = ver();
        it[sz+1] = ver();

        it[ind].lind = sz++;
        it[ind].rind = sz++;
    }

    add( x, num, l, (l+r)/2, it[ind].lind );
    add( x, num, (l+r)/2, r, it[ind].rind );

    it[ind].sum = it[ it[ind].lind ].sum + it[ it[ind].rind ].sum;

}
long long getSum ( long long l, long long r, long long ll = -(1LL<<50), long long rr = (1LL<<50), long long ind = 0 ) {
    if ( l <= ll && rr <= r ) { return it[ind].sum; }
    if ( rr <= l || r <= ll ) { return 0; }
    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( l, r, ll, (ll+rr)/2, it[ind].lind ) + getSum ( l, r, (ll+rr)/2, rr, it[ind].rind );
}

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( long long ind, long long sumX, long long sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

bool cmpev ( ev a, ev b ) {
    return a.x == b.x ?
        a.t < b.t
            : a.x < b.x;
}
vector < ev > v;
void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { return ; }

    v.clear();

    it[0] = ver();
    sz = 1;

    for ( long long i = 0 ; i < q ; i ++ ) {
        v.push_back( ev( inputf[i] + s*t[i], -1, 1, i ) );
        v.push_back( ev( inputf[i] + f*t[i], -1, 2, i ) );
    }
    for ( long long i = 0 ; i < n ; i ++ ) {
        v.push_back( ev ( a[i], acnt[i], 0, i ) );
    }

    sort( v.begin(), v.end(), cmpev );

    double slope = (f.y-s.y)/(double)(f.x-s.x);

    for ( long long i = 0 ; i < v.size() ; i ++ ) {
//        cout << "going for " << v[i].x << " " << v[i].y << "\n";

        if ( v[i].t == 0 ) {
            add ( floor ( v[i].y - v[i].x*slope ), v[i].cnt );
        }else {
            long long cc = getSum( -(1LL<<50), floor ( v[i].y - v[i].x*slope ) );
            if ( v[i].t == 1 ) { anscnt[ v[i].ind ] -= cc; }
            else { anscnt[ v[i].ind ] += cc; }
        }

    }

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( long long i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( long long i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        if ( i > 1000 ) { return 0; }
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
double eps = 0.000000001;

struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};
p operator + ( p a, p b ) {
    return p ( a.x + b.x, a.y + b.y );
}
p operator * ( p a, long long x ) {
    return p ( a.x*x, a.y*x );
}

long double slope;
struct ev {
    int x;
    double y;
    int t, ind, cnt;
    ev ( p c = p() , int cnt_ = 0, int t_ = 0, int ind_ = 0 ) {
        x = c.x;
        y = c.y - c.x*slope;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

long long  n, k, q;
long long wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)], acnt[(1<<20)], t[(1<<20)];

struct ver {
    int lind, rind;
    long long sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];
long long sz = 1;

void add ( long long  x, long long num, long long  l = (-1LL<<33), long long  r = ( 1LL<<33 ), int ind = 0 ) {
    if ( l == x && r == x+1 ) {
        it[ind].sum += num;
        return;
    }
    if ( r <= x || x+1 <= l ) { return; }

    if ( it[ind].lind == -1 ) {
        it[sz] = ver();
        it[sz+1] = ver();

        it[ind].lind = sz++;
        it[ind].rind = sz++;
    }

    add( x, num, l, (l+r)/2, it[ind].lind );
    add( x, num, (l+r)/2, r, it[ind].rind );

    it[ind].sum = it[ it[ind].lind ].sum + it[ it[ind].rind ].sum;

}
long long getSum ( long long  l, long long  r, long long  ll = -(1LL<<33), long long  rr = (1LL<<33), int ind = 0 ) {
    if ( l <= ll && rr <= r ) { return it[ind].sum; }
    if ( rr <= l || r <= ll ) { return 0; }
    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( l, r, ll, (ll+rr)/2, it[ind].lind ) + getSum ( l, r, (ll+rr)/2, rr, it[ind].rind );
}

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( long long ind, long long sumX, long long sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

bool cmpev ( ev a, ev b ) {

    if ( abs ( a.y - b.y ) < eps ) {
        if ( a.t == b.t ) { return a.x < b.x; }
        else { return a.t > b.t; }
    }
    return a.y < b.y ;
}
ev v[(1<<20)];
int szv = 0;

void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { cout <<" wazaa\n"; return ; }

    slope = (f.y-s.y)/(double)(f.x-s.x);
    szv = 0;

    it[0] = ver();
    sz = 1;

    for ( int i = 0 ; i < q ; i ++ ) {
        v[szv++ ] = ev( inputf[i] + s*t[i], -1, 1, i );
        v[szv++ ] = ev( inputf[i] + f*t[i], -1, 2, i );
    }
    for ( int i = 0 ; i < n ; i ++ ) {
        v[szv++] = ev ( a[i], acnt[i], 0, i ) ;
    }

    sort( v, v+szv, cmpev );

//    cout << s.x << " " << s.y << " : " << f.x << " " << f.y << ": \n";
    for ( int i = 0 ; i < szv ; i ++ ) {

//        cout << "going for " << v[i].x << " " << v[i].y << " " << v[i].t << " : " << (double)v[i].y - v[i].x*slope << "\n";

        if ( v[i].t == 0 ) {
            //add ( floor ( v[i].y - v[i].x*slope ), v[i].cnt );
            add ( v[i].x , v[i].cnt );
        }else {
            //long long cc = getSum( -(1LL<<33), floor ( v[i].y - v[i].x*slope ) );
            long long cc = getSum( -(1LL<<33), v[i].x );
//            cout << v[i].ind << " " << v[i].t << " recieves " << cc << "\n";

            if ( v[i].t == 1 ) { anscnt[ v[i].ind ] -= cc; }
            else { anscnt[ v[i].ind ] += cc; }
        }

    }
  //  cout << "\n\n";

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        if ( k == 10 && i == 15 ) { return 0; }
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
double eps = 0.000000001;

struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};
p operator + ( p a, p b ) {
    return p ( a.x + b.x, a.y + b.y );
}
p operator * ( p a, long long x ) {
    return p ( a.x*x, a.y*x );
}

struct ev {
    long long x, y;
    int t, ind, cnt;
    ev ( p c = p() , int cnt_ = 0, int t_ = 0, int ind_ = 0 ) {
        x = c.x;
        y = c.y;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

long long  n, k, q;
long long wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)], acnt[(1<<20)], t[(1<<20)];

struct ver {
    int lind, rind;
    long long sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];
long long sz = 1;

void add ( long long  x, long long num, long long  l = (-1LL<<33), long long  r = ( 1LL<<33 ), int ind = 0 ) {
    if ( l == x && r == x+1 ) {
        it[ind].sum += num;
        return;
    }
    if ( r <= x || x+1 <= l ) { return; }

    if ( it[ind].lind == -1 ) {
        it[sz] = ver();
        it[sz+1] = ver();

        it[ind].lind = sz++;
        it[ind].rind = sz++;
    }

    add( x, num, l, (l+r)/2, it[ind].lind );
    add( x, num, (l+r)/2, r, it[ind].rind );

    it[ind].sum = it[ it[ind].lind ].sum + it[ it[ind].rind ].sum;

}
long long getSum ( long long  l, long long  r, long long  ll = -(1LL<<33), long long  rr = (1LL<<33), int ind = 0 ) {
    if ( l <= ll && rr <= r ) { return it[ind].sum; }
    if ( rr <= l || r <= ll ) { return 0; }
    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( l, r, ll, (ll+rr)/2, it[ind].lind ) + getSum ( l, r, (ll+rr)/2, rr, it[ind].rind );
}

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( long long ind, long long sumX, long long sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

double slope;

bool cmpev ( ev a, ev b ) {
    if ( abs ( (a.y - a.x*slope) - (b.y - b.x*slope ) ) < eps ) {
        if ( a.t == b.t ) {
            return a.x < b.x;
        }
        return a.t > b.t;
    }
    return (a.y - a.x*slope) < (b.y - b.x*slope );
}
vector < ev > v;
void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { cout <<" wazaa\n"; return ; }

    v.clear();

    it[0] = ver();
    sz = 1;

    for ( int i = 0 ; i < q ; i ++ ) {
        v.push_back( ev( inputf[i] + s*t[i], -1, 1, i ) );
        v.push_back( ev( inputf[i] + f*t[i], -1, 2, i ) );
    }
    for ( int i = 0 ; i < n ; i ++ ) {
        v.push_back( ev ( a[i], acnt[i], 0, i ) );
    }

    slope = (f.y-s.y)/(double)(f.x-s.x);
    sort( v.begin(), v.end(), cmpev );

//    cout << s.x << " " << s.y << " : " << f.x << " " << f.y << ": \n";
    for ( int i = 0 ; i < v.size() ; i ++ ) {

//        cout << "going for " << v[i].x << " " << v[i].y << " " << v[i].t << " : " << (double)v[i].y - v[i].x*slope << "\n";

        if ( v[i].t == 0 ) {
            //add ( floor ( v[i].y - v[i].x*slope ), v[i].cnt );
            add ( v[i].x , v[i].cnt );
        }else {
            //long long cc = getSum( -(1LL<<33), floor ( v[i].y - v[i].x*slope ) );
            long long cc = getSum( -(1LL<<33), v[i].x );
//            cout << v[i].ind << " " << v[i].t << " recieves " << cc << "\n";

            if ( v[i].t == 1 ) { anscnt[ v[i].ind ] -= cc; }
            else { anscnt[ v[i].ind ] += cc; }
        }

    }
  //  cout << "\n\n";

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        if ( k == 10 && i == 10 ) { return 0; }
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};
p operator + ( p a, p b ) {
    return p ( a.x + b.x, a.y + b.y );
}
p operator * ( p a, long long x ) {
    return p ( a.x*x, a.y*x );
}

struct ev {
    long long x, y;
    int t, ind, cnt;
    ev ( p c = p() , long long cnt_ = 0, long long t_ = 0, long long ind_ = 0 ) {
        x = c.x;
        y = c.y;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

int n, k, q;
long long wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)], acnt[(1<<20)], t[(1<<20)];

struct ver {
    int lind, rind, sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];
long long sz = 1;

void add ( int x, int num, int l = (-1LL<<30), int r = ( 1LL<<30 ), int ind = 0 ) {
    if ( l == x && r == x+1 ) {
        it[ind].sum += num;
        return;
    }
    if ( r <= x || x+1 <= l ) { return; }

    if ( it[ind].lind == -1 ) {
        it[sz] = ver();
        it[sz+1] = ver();

        it[ind].lind = sz++;
        it[ind].rind = sz++;
    }

    add( x, num, l, (l+r)/2, it[ind].lind );
    add( x, num, (l+r)/2, r, it[ind].rind );

    it[ind].sum = it[ it[ind].lind ].sum + it[ it[ind].rind ].sum;

}
long long getSum ( int l, int r, int ll = -(1LL<<30), int rr = (1LL<<30), int ind = 0 ) {
    if ( l <= ll && rr <= r ) { return it[ind].sum; }
    if ( rr <= l || r <= ll ) { return 0; }
    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( l, r, ll, (ll+rr)/2, it[ind].lind ) + getSum ( l, r, (ll+rr)/2, rr, it[ind].rind );
}

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( long long ind, long long sumX, long long sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

bool cmpev ( ev a, ev b ) {
    return a.x == b.x ?
        a.t < b.t
            : a.x < b.x;
}
vector < ev > v;
void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { return ; }

    v.clear();

    it[0] = ver();
    sz = 1;

    for ( long long i = 0 ; i < q ; i ++ ) {
        v.push_back( ev( inputf[i] + s*t[i], -1, 1, i ) );
        v.push_back( ev( inputf[i] + f*t[i], -1, 2, i ) );
    }
    for ( long long i = 0 ; i < n ; i ++ ) {
        v.push_back( ev ( a[i], acnt[i], 0, i ) );
    }

    sort( v.begin(), v.end(), cmpev );

    double slope = (f.y-s.y)/(double)(f.x-s.x);

    for ( long long i = 0 ; i < v.size() ; i ++ ) {
//        cout << "going for " << v[i].x << " " << v[i].y << "\n";

        if ( v[i].t == 0 ) {
            add ( floor ( v[i].y - v[i].x*slope ), v[i].cnt );
        }else {
            long long cc = getSum( -(1LL<<30), floor ( v[i].y - v[i].x*slope ) );
            if ( v[i].t == 1 ) { anscnt[ v[i].ind ] -= cc; }
            else { anscnt[ v[i].ind ] += cc; }
        }

    }

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
double eps = 0.000000001;

struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};
p operator + ( p a, p b ) {
    return p ( a.x + b.x, a.y + b.y );
}
p operator * ( p a, long long x ) {
    return p ( a.x*x, a.y*x );
}

double slope;
struct ev {
    int x;
    double y;
    int t, ind, cnt;
    ev ( p c = p() , int cnt_ = 0, int t_ = 0, int ind_ = 0 ) {
        x = c.x;
        y = c.y - c.x*slope;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

long long  n, k, q;
long long wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)], acnt[(1<<20)], t[(1<<20)];

struct ver {
    int lind, rind;
    long long sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];
long long sz = 1;

void add ( int x, int num, long long  l = (-1LL<<32), long long  r = ( 1LL<<32 ), int ind = 0 ) {
    if ( l == x && r == x+1 ) {
        it[ind].sum += num;
        return;
    }
    if ( r <= x || x+1 <= l ) { return; }

    if ( x < (l+r)/2 ) {
        if ( it[ind].lind == -1 ) {
            it[sz] = ver();
            it[ind].lind = sz++;
        }
        add( x, num, l, (l+r)/2, it[ind].lind );
    }
    else {
        if ( it[ind].rind == -1 ) {
            it[sz] = ver();
            it[ind].rind = sz++;
        }
        add( x, num, (l+r)/2, r, it[ind].rind );
    }

    it[ind].sum += num;

}
long long getSum ( long long l, long long  r, long long  ll = -(1LL<<32), long long  rr = (1LL<<32), int ind = 0 ) {
    if ( ind == -1 ) { return 0;}
    if ( l <= ll && rr <= r ) { return it[ind].sum; }
    if ( rr <= l || r <= ll ) { return 0; }
//    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( l, r, ll, (ll+rr)/2, it[ind].lind ) + getSum ( l, r, (ll+rr)/2, rr, it[ind].rind );
}

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( long long ind, long long sumX, long long sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

bool cmpev ( ev a, ev b ) {

    if ( abs ( a.y - b.y ) < eps ) {
        if ( a.t == b.t ) { return a.x < b.x; }
        else { return a.t > b.t; }
    }
    return a.y < b.y ;
}
ev v[(1<<20)];
int szv = 0;

void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { cout <<" wazaa\n"; return ; }

    slope = (f.y-s.y)/(double)(f.x-s.x);
    szv = 0;

    it[0] = ver();
    sz = 1;

    for ( int i = 0 ; i < q ; i ++ ) {
        v[szv++ ] = ev( inputf[i] + s*t[i], -1, 1, i );
        v[szv++ ] = ev( inputf[i] + f*t[i], -1, 2, i );
    }
    for ( int i = 0 ; i < n ; i ++ ) {
        v[szv++] = ev ( a[i], acnt[i], 0, i ) ;
    }

    sort( v, v+szv, cmpev );

//    cout << s.x << " " << s.y << " : " << f.x << " " << f.y << ": \n";
    for ( int i = 0 ; i < szv ; i ++ ) {

//        cout << "going for " << v[i].x << " " << v[i].y << " " << v[i].t << " : " << (double)v[i].y - v[i].x*slope << "\n";

        if ( v[i].t == 0 ) {
            //add ( floor ( v[i].y - v[i].x*slope ), v[i].cnt );
            add ( v[i].x , v[i].cnt );
        }else {
            //long long cc = getSum( -(1LL<<32), floor ( v[i].y - v[i].x*slope ) );
            long long cc = getSum( -(1LL<<32), v[i].x );
//            cout << v[i].ind << " " << v[i].t << " recieves " << cc << "\n";

            if ( v[i].t == 1 ) { anscnt[ v[i].ind ] -= cc; }
            else { anscnt[ v[i].ind ] += cc; }
        }

    }
  //  cout << "\n\n";

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        if ( k == 10 && i == 20 ) { return 0; }
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};

long double slope;
struct ev {
    long long x;
    long double y;
    int t, ind, cnt;
    ev ( long long x_ = 0, long long y_ = 0, int cnt_ = 0, int t_ = 0, int ind_ = 0 ) {
        x = x_;
        y = y_ - x_*slope;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

int n, k, q;
int wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)];
int acnt[(1<<20)], t[(1<<20)];

struct ver {
    int lind, rind;
    long long sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( int ind, int sumX, int sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

int sz = 1;

long long xq, numq;
void add ( long long  l = (-1LL<<32), long long  r = ( 1LL<<32 ), int ind = 0 ) {
    if ( l == xq && r == xq+1 ) {
        it[ind].sum += numq;
        return;
    }
    if ( r <= xq || xq+1 <= l ) { return; }

    if ( xq < (l+r)/2 ) {
        if ( it[ind].lind == -1 ) {
            it[sz] = ver();
            it[ind].lind = sz++;
        }
        add( l, (l+r)/2, it[ind].lind );
    }
    else {
        if ( it[ind].rind == -1 ) {
            it[sz] = ver();
            it[ind].rind = sz++;
        }
        add( (l+r)/2, r, it[ind].rind );
    }

    it[ind].sum += numq;

}
long long lq, rq;
long long getSum ( long long  ll = -(1LL<<32), long long rr = (1LL<<32), int ind = 0 ) {
    if ( ind == -1 ) { return 0;}
    if ( lq <= ll && rr <= rq ) { return it[ind].sum; }
    if ( rr <= lq || rq <= ll ) { return 0; }
//    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( ll, (ll+rr)/2, it[ind].lind ) + getSum ( (ll+rr)/2, rr, it[ind].rind );
}

bool cmpev ( ev a, ev b ) {
    if ( a.y == b.y ) {
        if ( a.t == b.t ) { return a.x < b.x; }
        else { return a.t > b.t; }
    }
    return a.y < b.y ;
}
ev v[(1<<20)];
int szv = 0;

void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { cout <<" wazaa\n"; return ; }

    slope = (f.y-s.y)/(double)(f.x-s.x);
    szv = 0;

    it[0] = ver();
    sz = 1;

    for ( int i = 0 ; i < q ; i ++ ) {
        v[szv++ ] = ev( inputf[i].x + s.x*t[i], inputf[i].y + s.y*t[i], -1, 1, i );
    }
    for ( int i = 0 ; i < n ; i ++ ) {
        v[szv++] = ev ( a[i].x, a[i].y, acnt[i], 0, i ) ;
    }

    sort( v, v+szv, cmpev );

//    cout << s.x << " " << s.y << " : " << f.x << " " << f.y << ": \n";
    for ( int i = 0 ; i < szv ; i ++ ) {

//        cout << "going for " << v[i].x << " " << v[i].y << " " << v[i].t << "\n";

        if ( v[i].t == 0 ) {

            xq = v[i].x;
            numq = v[i].cnt;
            add ();
        }else {

            int ind = v[i].ind;

            lq = inputf[ind].x + s.x*t[ind];
            rq = inputf[ind].x + f.x*t[ind];

            int coef = 1;
            if ( lq > rq ) { coef = -1; swap( lq, rq ); }

            long long cc = getSum();
//            cout << v[i].ind << " " << lq << " " << rq << " recieves " << cc << "\n";

            anscnt[ind] += cc*coef;
        }

    }
 //   cout << "\n\n";

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
double eps = 0.000000001;

struct p {
    long long x, y;
    p ( long long x_ = 0 , long long y_ = 0) {
        x = x_;
        y = y_;
    }
};
p operator + ( p a, p b ) {
    return p ( a.x + b.x, a.y + b.y );
}
p operator * ( p a, long long x ) {
    return p ( a.x*x, a.y*x );
}

double slope;
struct ev {
    int x;
    double y;
    int t, ind, cnt;
    ev ( p c = p() , int cnt_ = 0, int t_ = 0, int ind_ = 0 ) {
        x = c.x;
        y = c.y - c.x*slope;
        cnt = cnt_;
        t = t_;
        ind = ind_;
    }
};
long long cross ( p a, p b, p c ) {
    a.x -= b.x;
    a.y -= b.y;

    c.x -= b.x;
    c.y -= b.y;

    return a.x*c.y - a.y*c.x;
}
long long dist2 ( p a, p b ) {
    return ( a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

long long  n, k, q;
long long wx[16], wy[16];
vector < p > poly;
p inputf[(1<<20)], a[(1<<20)];
long long anscnt[(1<<20)], acnt[(1<<20)], t[(1<<20)];

struct ver {
    int lind, rind;
    long long sum;
    ver ( ) {
        lind = -1;
        rind = -1;
        sum = 0;
    }
}it[(1<<22)];
long long sz = 1;

void add ( long long  x, long long num, long long  l = (-1LL<<33), long long  r = ( 1LL<<33 ), int ind = 0 ) {
    if ( l == x && r == x+1 ) {
        it[ind].sum += num;
        return;
    }
    if ( r <= x || x+1 <= l ) { return; }

    if ( it[ind].lind == -1 ) {
        it[sz] = ver();
        it[sz+1] = ver();

        it[ind].lind = sz++;
        it[ind].rind = sz++;
    }

    add( x, num, l, (l+r)/2, it[ind].lind );
    add( x, num, (l+r)/2, r, it[ind].rind );

    it[ind].sum = it[ it[ind].lind ].sum + it[ it[ind].rind ].sum;

}
long long getSum ( long long  l, long long  r, long long  ll = -(1LL<<33), long long  rr = (1LL<<33), int ind = 0 ) {
    if ( l <= ll && rr <= r ) { return it[ind].sum; }
    if ( rr <= l || r <= ll ) { return 0; }
    if ( it[ind].lind == -1 ) { return 0; }

    return getSum ( l, r, ll, (ll+rr)/2, it[ind].lind ) + getSum ( l, r, (ll+rr)/2, rr, it[ind].rind );
}

p chcent;
bool cmpch ( p a, p b ) {
    long long ans = cross ( a, chcent, b );
    if ( ans == 0 ) {
        return dist2( a, chcent ) < dist2 ( b, chcent );
    }
    return ans > 0;
}
vector < p > getHull ( vector < p > pts ) {
    vector < p > ans;
    if ( pts.size() == 0 ) { return ans; }

    long long minind = 0;
    for ( long long i = 1 ; i < pts.size() ; i ++ ) {
        if ( pts[minind].y > pts[i].y || ( pts[minind].y == pts[i].y && pts[minind].x > pts[i].x ) ) {
            minind = i;
        }
    }

    swap( pts[ minind ], pts[ 0 ] );
    chcent = pts[0];
    sort( pts.begin()+1, pts.end(), cmpch );

/*
    cout << chcent.x << " " << chcent.y << "\n";
    cout << "sorted: \n";
    for ( long long i = 0 ; i < pts.size() ; i ++ ) {
        cout << pts[i].x << " " << pts[i].y << "\n";
    }
    cout << "\n";
*/

    for ( long long i = 0 ; i < pts.size() ; i ++ ) {

        for ( ; ans.size() >= 2 && cross( ans[ ans.size()-2 ], ans.back(), pts[i] ) >= 0 ; ans.pop_back() ) {}
        ans.push_back( pts[i] );
    }

    /*
    cout <<"hull:\n";
    for ( long long i = 0 ; i < ans.size() ; i ++ ) {
        cout << ans[i].x << " " << ans[i].y << "\n";
    }
    */

    return ans;
}
void generatePoly ( long long ind, long long sumX, long long sumY ) {
    if ( ind == k ) {
        poly.push_back( p( sumX, sumY ) );
        return;
    }
    generatePoly( ind+1, sumX + wx[ind], sumY + wy[ind] );
    generatePoly( ind+1, sumX - wx[ind], sumY - wy[ind] );
}

bool cmpev ( ev a, ev b ) {

    if ( abs ( a.y - b.y ) < eps ) {
        if ( a.t == b.t ) { return a.x < b.x; }
        else { return a.t > b.t; }
    }
    return a.y < b.y ;
}
ev v[(1<<20)];
int szv = 0;

void getCnt ( p s, p f ) {
    if ( s.x == f.x ) { cout <<" wazaa\n"; return ; }

    slope = (f.y-s.y)/(double)(f.x-s.x);
    szv = 0;

    it[0] = ver();
    sz = 1;

    for ( int i = 0 ; i < q ; i ++ ) {
        v[szv++ ] = ev( inputf[i] + s*t[i], -1, 1, i );
        v[szv++ ] = ev( inputf[i] + f*t[i], -1, 2, i );
    }
    for ( int i = 0 ; i < n ; i ++ ) {
        v[szv++] = ev ( a[i], acnt[i], 0, i ) ;
    }

    sort( v, v+szv, cmpev );

//    cout << s.x << " " << s.y << " : " << f.x << " " << f.y << ": \n";
    for ( int i = 0 ; i < szv ; i ++ ) {

//        cout << "going for " << v[i].x << " " << v[i].y << " " << v[i].t << " : " << (double)v[i].y - v[i].x*slope << "\n";

        if ( v[i].t == 0 ) {
            //add ( floor ( v[i].y - v[i].x*slope ), v[i].cnt );
            add ( v[i].x , v[i].cnt );
        }else {
            //long long cc = getSum( -(1LL<<33), floor ( v[i].y - v[i].x*slope ) );
            long long cc = getSum( -(1LL<<33), v[i].x );
//            cout << v[i].ind << " " << v[i].t << " recieves " << cc << "\n";

            if ( v[i].t == 1 ) { anscnt[ v[i].ind ] -= cc; }
            else { anscnt[ v[i].ind ] += cc; }
        }

    }
  //  cout << "\n\n";

}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> k >> n >> q;
    for ( int i = 0 ; i < k ; i ++ ) {
        cin >> wx[i] >> wy[i];
    }
    generatePoly( 0, 0, 0 );
    poly = getHull( poly );

/*
    cout << "poly:\n";
    for ( long long i = 0 ; i < poly.size() ; i ++ ) {
        cout << poly[i].x << " " << poly[i].y << "\n";
    }
    cout << "\n";
*/

    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> a[i].x >> a[i].y >> acnt[i];
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cin >> inputf[i].x >> inputf[i].y >> t[i];
    }

    for ( int i = 0 ; i < poly.size() ; i ++ ) {
        if ( k == 10 && i == 15 ) { return 0; }
        getCnt( poly[i], poly[( i+1 )%poly.size() ] );
    }
    for ( int i = 0 ; i < q ; i ++ ) {
        cout << -anscnt[i] << "\n";
    }
    return 0;
}