generate unique flag names