gets a=gets.split.group_by{|i|i} p a.keys.combination(3).inject(0){|s,r|s+r.inject(1){|t,i|t*a[i].size}}%1000000007