#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=5500+5,M=1500,inf=0x3f3f3f3f,mod=1e9+7;
#define mst(a,b) memset(a,b,sizeof a)
#define lx x<<1
#define rx x<<1|1
#define reg register
#define PII pair<int,int>
#define fi first
#define se second
#define pb push_back
#define il inline
int sx,sy,ex,ey;
int main(){
	cin>>sx>>sy>>ex>>ey;
	for(int i=0;i<ey-sy;i++)	putchar('U');
	for(int i=0;i<ex-sx;i++) putchar('R');
	for(int i=0;i<ey-sy;i++)	putchar('D');
	for(int i=0;i<ex-sx;i++) putchar('L');
	putchar('L');
	for(int i=0;i<=ey-sy;i++)	putchar('U');
	for(int i=0;i<=ex-sx;i++) putchar('R');
	putchar('D');
	putchar('R');
	for(int i=0;i<=ey-sy;i++)	putchar('D');
	for(int i=0;i<=ex-sx;i++) putchar('L');
	putchar('U');
	return 0;
}
#include <iostream>

using namespace std;

int main (void) {
  int G[101][101] = {0}, sum[101] = {0}, rank[101] = {0};
  int a, b, c, d;
  int n;

  cin >> n;

  for(int i = 1; i <= n*(n-1)/2; i++) {
    cin >> a >> b >> c >> d;
    if(c < d) {
      G[a][b] = 0; G[b][a] = 3;
    } else if(c == d) {
      G[a][b] = 1; G[b][a] = 1;
    } else {
      G[a][b] = 3; G[b][a] = 0;
    }
  }

  for(int i = 1; i <= n; i++) {
    for(int j = 1; j <= n; j++) {
      if (i == j) continue;
      sum[i] += G[i][j];
    }
  }

  //cout << sum[0] << " " << sum[1] << " " << sum[2] << " " << sum[3] << endl;

  int daburi = 1;

  // rankの出し方は俺が考えたアルゴリズムじゃない
  for(int i = 1; i <= n; i++) {
    rank[i] = 1;
    for(int j = 1; j <= n; j++) {
      if(sum[i] < sum[j]) rank[i]++;
    }
  }

  for(int i = 1; i <= n; i++) {
    cout << rank[i] << endl;
  }

  return 0;
}