trigrams are hard

Nice use of string methods.