import java.io.FileNotFoundException;
import java.util.*;

public class Main {

    public static void main( String[] args ) throws FileNotFoundException {
        Scanner scan = new Scanner( System.in );
        int n = scan.nextInt();
        int nn = n * n;
        Map<Integer, Integer> map = new HashMap<>();
        for ( int i = 0; i < nn; ++i ) {
            int x = scan.nextInt();
            Integer value = map.get( x );
            if ( value == null ) {
                map.put( x, 1 );
            } else {
                map.put( x, value + 1 );
            }
        }

        List<Integer> result = new ArrayList<>();
        List<Integer> result2 = new ArrayList<>();
        for ( Map.Entry<Integer, Integer> entry : map.entrySet() ) {
            if ( entry.getValue() % 2 == 1 ) {
                result.add( entry.getKey() );
            } else {
                result2.add( entry.getKey() );
            }
        }
        if ( result.isEmpty() ) {
            result.addAll( result2 );
        }
        while ( result.size() < n ) {
            result.add( result.get( 0 ) );
        }
        for ( int i = 0; i < n; ++i ) {
            System.out.print( result.get( i ) + " " );
        }
    }
}
