#include <bits/stdc++.h>
#define arr array 
#define pb push_back
#define fs first 
#define sc second
#define eb emplace_back
#define vt vector
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

using namespace std;
typedef long long ll;
const int maxn=2e5;
const int MAXINT=1e9;
const ll MAXLL=1e18;


void solve(){
    int n;
    cin >> n;
    n*=2;
    vt<arr<int, 3>> a(n);
    rep(i, 0, n) cin >> a[i][0], a[i][1]=i;
    sort(a.begin(), a.end(), [&](arr<int, 3> x, arr<int, 3> y){
        return x[0]<y[0];
    });
    rep(i, 0, n/2) a[i][2]=1;
    rep(i, n/2, n) a[i][2]=0;
    sort(a.begin(), a.end(), [&](arr<int, 3> x, arr<int, 3> y){
        return x[1]<y[1];
    });
    
    //rep(i, 0, n) cout << a[i][2] << " "; cout << endl;
    vt<int> st;
    vt<char> ans(n);
    rep(i, 0, n){
        if (!st.empty()&&a[i][2]!=a[st.back()][2]) ans[st.back()]='(', ans[i]=')', st.pop_back();
        else st.pb(i);
    }
    rep(i, 0, n) cout << ans[i]; cout << endl;
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int t=1;
    while(t--){
        solve();
    }
}
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;

#define debug(x) cerr << #x << '=' << x <<'\n'
#define rep(i, b, n) for (int i = b; i <= n; i++)

const int N = 1123456;

int n, m, a, b;

char s[N];

int main(void) {
    scanf("%s", s + 1);
    int len = strlen(s + 1);
    rep (i, 2, len) {
        if (s[i] != s[i - 1]) {
            puts("Lost");
            return 0;
        } 
    }
    puts("Won");
    return 0;
}