﻿version (all) {
import std.math,
       std.conv,
       std.stdio,
       std.ascii,
       std.range,
       std.array,
       std.regex,
       std.format,
       std.bigint,
       std.traits,
       std.random,
       std.string,
       std.numeric,
       std.variant,
       std.typecons,
       std.container,
       std.algorithm,
       std.typetuple,
       std.exception,
       core.checkedint;
}

void main() {

	readln.strip;
	auto a = readln.split.map!(to!uint).array;

	foreach (el; a) {
		write(1 + a.filter!(c => c > el).array.length, ' ');
	}

	writeln();
}