#![allow(non_snake_case)] use std::collections::HashSet; use proconio::{input, marker::Bytes}; fn main() { input! { n: usize, s: [Bytes; n] } let mut strs = HashSet::new(); for i in 0..n { for j in 0..n { if i != j { let mut t = s[i].clone(); t.append(&mut s[j].clone()); strs.insert(t); } } } let ans = strs.len(); println!("{ans}"); }