object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val list = List.fill(n)(sc.next)

  def GreenBin(l: List[String]): Int = {
    val s = "aaa"
    val ls = l
      .map(x => x.groupBy(v => v))
      .zipWithIndex
    val x = for {
      li <- ls
      lj <- ls.tail
      if li._2 != lj._2 && li._1 == lj._1
    } yield
      if (li._2 < lj._2)
        (li._2, lj._2)
      else
        (lj._2, li._2)
    x.toSet.size
  }
}
