import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
TreeMap<Integer,StringBuilder> tm=new TreeMap<>();
for(int m=0;m<100;m++){
StringBuilder sb = new StringBuilder("");
tm.put(m,sb);
}
for(int a0 = 0; a0 < n; a0++){
int x = in.nextInt();
String s = in.next();
if(a0<(n/2))
{
StringBuilder sold=tm.get(x);
sold.append("- ");
tm.put(x,sold);
}
else
{
StringBuilder sold=tm.get(x);
sold.append(s+" ");
tm.put(x,sold);
}
}
for (Map.Entry<Integer, StringBuilder> entry : tm.entrySet()) {
StringBuilder s=entry.getValue();
//for(int i=0;i<s.length();i++)
System.out.print(s);
}
in.close();
}
}
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
TreeMap<Integer,StringBuilder> tm=new TreeMap<>();
for(int m=0;m<100;m++){
StringBuilder sb = new StringBuilder("");
tm.put(m,sb);
}
for(int a0 = 0; a0 < n; a0++){
int x = in.nextInt();
String s = in.next();
if(a0<(n/2))
{
StringBuilder sold=tm.get(x);
sold.append("- ");
tm.put(x,sold);
}
else
{
StringBuilder sold=tm.get(x);
sold.append(s+" ");
tm.put(x,sold);
}
}
for (Map.Entry<Integer, StringBuilder> entry : tm.entrySet()) {
StringBuilder s=entry.getValue();
//for(int i=0;i<s.length();i++)
System.out.print(s);
}
in.close();
}
}