<commit_before><commit_msg>add NY10A<commit_after>#!/usr/bin/env python
# -*- encoding: utf8 -*-
'''Module docstring
'''

__author__ = 'noahsark'

import sys

patterns = {'TTT': 0, 'TTH': 1, 'THT': 2, 'THH': 3, 'HTT': 4, 'HTH': 5, 'HHT': 6, 'HHH': 7}

N = int(sys.stdin.readline())
for i in range(N):
    num = sys.stdin.readline().strip()
    seq = sys.stdin.readline().strip()
    counts = [0 for j in range(len(patterns))]
    for j in range(0, len(seq) - 2):
        counts[patterns[seq[j:j + 3]]] += 1
    print '%s %s' % (num, ' '.join(map(str, counts)))
{'fraction_non_alphanumeric': 0.22857142857142856, 'fraction_numerical': 0.02857142857142857, 'mean_word_length': 3.5609756097560976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2083949', 'n_tokens_mistral': 247, 'n_tokens_neox': 235, 'n_words': 59}