Module Module1

    Sub Main()

        Dim N As Integer = CInt(Console.ReadLine())
        Dim A As String() = Split(Console.ReadLine(), " ")
        Dim r As Integer = 0

        For k As Integer = 0 To N - 1
            r = 0
            For i As Integer = 0 To N - 1
                For j As Integer = i + 1 To N - 1
                    If i <> k And j <> k Then
                        If A(i) = A(j) Then
                            r += 1
                        End If
                    End If
                Next
            Next
            Console.WriteLine(r)
        Next

    End Sub

End Module