let n1 = Int(readLine()!)!
    
    var n2 = readLine()!.split(separator: " ").map({$0})
    
    var r: Int = 0
    var t: Int = 1
    var q: Int = 1
    
    var dict = [Int : Int]()
    
    for _ in 0 ..< n1 {
      
      dict[t] = 0
      
      t += 1
    }
    
    for j in 0 ..< n2.count {
      
      let num = Int(n2[j])!
      
      if dict.keys.contains(num) {
        
        if q == num {
          r += 1
          dict[num] = r
        } else {
          r = 1
          dict[num] = r
          q = num
        }
      }
    }

    for (_, value) in dict.sorted(by: {$0 < $1}) {
      print("\(value)")
      }