You are given a non-empty string s=s_1s_2... s_n, which consists only of lowercase Latin letters. Polycarp does not like a string if it contains at least one string "one" or at least one string "two" (or both at the same time) as a substring. In other words, Polycarp does not like the string s if there is an integer j (1 ≤ j ≤ n-2), that s_{j}s_{j+1}s_{j+2}="one" or s_{j}s_{j+1}s_{j+2}="two".

For example:

  * Polycarp does not like strings "oneee", "ontwow", "twone" and "oneonetwo" (they all have at least one substring "one" or "two"), 
  * Polycarp likes strings "oonnee", "twwwo" and "twnoe" (they have no substrings "one" and "two"). 



Polycarp wants to select a certain set of indices (positions) and remove all letters on these positions. All removals are made at the same time.

For example, if the string looks like s="onetwone", then if Polycarp selects two indices 3 and 6, then "onetwone" will be selected and the result is "ontwne".

What is the minimum number of indices (positions) that Polycarp needs to select to make the string liked? What should these positions be?

Input

The first line of the input contains an integer t (1 ≤ t ≤ 10^4) — the number of test cases in the input. Next, the test cases are given.

Each test case consists of one non-empty string s. Its length does not exceed 1.5⋅10^5. The string s consists only of lowercase Latin letters.

It is guaranteed that the sum of lengths of all lines for all input data in the test does not exceed 1.5⋅10^6.

Output

Print an answer for each test case in the input in order of their appearance.

The first line of each answer should contain r (0 ≤ r ≤ |s|) — the required minimum number of positions to be removed, where |s| is the length of the given line. The second line of each answer should contain r different integers — the indices themselves for removal in any order. Indices are numbered from left to right from 1 to the length of the string. If r=0, then the second line can be skipped (or you can print empty). If there are several answers, print any of them.

Examples

Input


4
onetwone
testme
oneoneone
twotwo


Output


2
6 3
0

3
4 1 7 
2
1 4


Input


10
onetwonetwooneooonetwooo
two
one
twooooo
ttttwo
ttwwoo
ooone
onnne
oneeeee
oneeeeeeetwooooo


Output


6
18 11 12 1 6 21 
1
1 
1
3 
1
2 
1
6 
0

1
4 
0

1
1 
2
1 11 

Note

In the first example, answers are:

  * "onetwone", 
  * "testme" — Polycarp likes it, there is nothing to remove, 
  * "oneoneone", 
  * "twotwo". 



In the second example, answers are: 

  * "onetwonetwooneooonetwooo", 
  * "two", 
  * "one", 
  * "twooooo", 
  * "ttttwo", 
  * "ttwwoo" — Polycarp likes it, there is nothing to remove, 
  * "ooone", 
  * "onnne" — Polycarp likes it, there is nothing to remove, 
  * "oneeeee", 
  * "oneeeeeeetwooooo".

Difficulty: MEDIUM

Solutions:
t = int(input())
for i in range(t):
	ch = input()
	n = len(ch)
	tab = [0] * (n + 1)
	L = []
	s = set()
	for j in range(1, n - 1):
		if ch[j - 1] == 't' and ch[j] == 'w' and (ch[j + 1] == 'o'):
			if j + 3 < n and ch[j + 2] == 'n' and (ch[j + 3] == 'e'):
				L.append(j + 2)
				tab[j + 2] = 1
			else:
				L.append(j + 1)
		if ch[j - 1] == 'o' and ch[j] == 'n' and (ch[j + 1] == 'e'):
			if tab[j] == 0:
				if j - 3 >= 0 and ch[j - 3] == 't' and (ch[j - 2] == 'w'):
					L.append(j)
				else:
					L.append(j + 1)
	s = ''
	if L == []:
		print(0)
		print()
	else:
		print(len(L))
		for j in range(len(L)):
			s += str(L[j]) + ' '
		print(s)


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
mod = 10 ** 9 + 7
t = int(input())
for y in range(t):
	a = input()
	n = len(a)
	i = 0
	ch = 0
	ans = []
	while i <= n - 3:
		if a[i:i + 3] == 'one':
			ch += 1
			ans.append(i + 2)
			i += 3
		elif a[i:i + 3] == 'two':
			if i <= n - 5:
				if a[i:i + 5] == 'twone':
					ans.append(i + 3)
				else:
					ans.append(i + 2)
			else:
				ans.append(i + 2)
			ch += 1
			i += 3
		else:
			i += 1
	print(ch)
	for i in ans:
		print(i, end=' ')
	print()


tc = int(input())
for t in range(tc):
	s = input()
	n = len(s)
	one = []
	two = []
	for i in range(n - 2):
		if s[i:i + 3] == 'one':
			one.append(i + 1)
		if s[i:i + 3] == 'two':
			two.append(i + 1)
	ans = []
	while True:
		if len(one) == 0 and len(two) == 0:
			break
		elif len(one) == 0:
			ans.append(two[0] + 1)
			del two[0]
		elif len(two) == 0:
			ans.append(one[0] + 1)
			del one[0]
		elif one[0] >= two[0] + 3:
			ans.append(two[0] + 1)
			del two[0]
		elif two[0] >= one[0] + 3:
			ans.append(one[0] + 1)
			del one[0]
		else:
			ans.append(two[0] + 2)
			del one[0]
			del two[0]
	print(len(ans))
	for x in ans:
		print(x, end=' ')
	print()


t = int(input())
for _ in range(t):
	s = input()
	(A, B, C) = (0, 0, 0)
	j = 0
	a = []
	while j < len(s) - 2:
		if s[j:j + 3] == 'one':
			a.append(j + 1)
			j += 3
		elif s[j:j + 3] == 'two':
			if j < len(s) - 4:
				if s[j + 3:j + 5] == 'ne':
					a.append(j + 2)
					j += 5
				else:
					a.append(j + 1)
					j += 3
			else:
				a.append(j + 1)
				j += 3
		else:
			j += 1
	print(len(a))
	for l in a:
		print(l + 1, end=' ')
	print()


for t in range(int(input())):
	st = input()
	li = []
	length = len(st) - 2
	i = 0
	while i < length:
		if st[i] == 'o':
			if st[i:i + 3] == 'one':
				li.append(i + 1)
				i = i + 2
		elif st[i] == 't':
			if i < length - 2 and st[i:i + 5] == 'twone':
				li.append(i + 2)
				i = i + 4
			elif st[i:i + 3] == 'two':
				li.append(i + 1)
				i = i + 2
		i = i + 1
	print(len(li))
	for i in li:
		print(i + 1, end=' ')
	print()


import sys
from collections import Counter
from math import *
for _ in range(int(input())):
	s = input()
	n = len(s)
	li1 = []
	li2 = []
	li3 = []
	i = 0
	while i + 5 <= n:
		if s[i:i + 5] == 'twone':
			li3.append(i + 2)
			i += 5
			continue
		if s[i:i + 3] == 'one':
			li1.append(i + 1)
			i += 3
			continue
		if s[i:i + 3] == 'two':
			li2.append(i + 1)
			i += 3
			continue
		i += 1
	while i + 3 <= n:
		if s[i:i + 3] == 'one':
			li1.append(i + 1)
			i += 3
		if s[i:i + 3] == 'two':
			li2.append(i + 1)
			i += 3
		i += 1
	print(len(li1) + len(li2) + len(li3))
	for i in sorted(li1 + li2 + li3):
		print(i + 1, end=' ')
	print()


for _ in range(int(input())):
	s = input()
	i = 0
	req = 0
	ans = []
	while i < len(s):
		if s[i:i + 5] == 'twone':
			req += 1
			ans.append(i + 2)
			i += 5
		elif s[i:i + 3] == 'one' or s[i:i + 3] == 'two':
			req += 1
			ans.append(i + 1)
			i += 3
		else:
			i += 1
	print(req)
	for a in ans:
		print(a + 1, end=' ')
	print()


T = int(input())
anwer = ''
for t in range(T):
	string = list(input())
	n = len(string)
	remove = list()
	count = 0
	twone = list('twone')
	one = list('one')
	two = list('two')
	for i in range(n):
		if i != 0:
			if i + 3 < n:
				if string[i - 1:i + 4] == twone:
					string[i + 1] = ' '
					remove.append(i + 2)
					count += 1
					continue
				s = string[i - 1:i + 2]
				if s == one or s == two:
					string[i] = ' '
					remove.append(i + 1)
					count += 1
					continue
			elif i + 1 < n:
				s = string[i - 1:i + 2]
				if s == one or s == two:
					string[i] = ' '
					remove.append(i + 1)
					count += 1
					continue
	anwer += str(count) + '\n'
	for r in remove:
		anwer += str(r) + ' '
	anwer += '\n'
print(anwer)


for _ in range(int(input())):
	s = input()
	x = len(s)
	ans = []
	i = 0
	while i < x:
		if s[i:i + 5] == 'twone':
			ans.append(i + 2)
			i += 5
		elif s[i:i + 3] == 'two':
			ans.append(i + 1)
			i += 1
		elif s[i:i + 3] == 'one':
			ans.append(i + 1)
			i += 1
		else:
			i += 1
	print(len(ans))
	for an in ans:
		print(an + 1, end=' ')
	print()


for _ in range(int(input())):
	a = input()
	a += 'z'
	b = [0] * len(a)
	d = 1
	while d < len(a) - 1:
		d += 1
		if a[d - 2] + a[d - 1] + a[d] in ['one', 'two']:
			b[d - 1] += 1
	for i in range(len(b) - 1):
		if b[i] == 1 and b[i + 2] == 1:
			b[i] = 0
			b[i + 2] = 0
			b[i + 1] = 1
	print(b.count(1))
	for i in range(len(b)):
		if b[i] == 1:
			print(i + 1, end=' ')
	print()


I = input
for _ in range(int(I())):
	s = list(I())
	ind = []
	i = 0
	n = len(s)
	while i < n:
		if i + 2 < n and (s[i] == 'o' and s[i + 1] == 'n' and (s[i + 2] == 'e') or (s[i] == 't' and s[i + 1] == 'w' and (s[i + 2] == 'o'))):
			if i + 4 < n and s[i + 2] == 'o' and (s[i + 3] == 'n') and (s[i + 4] == 'e'):
				ind.append(i + 2 + 1)
				i += 4
			else:
				ind.append(i + 1 + 1)
				i += 2
		i += 1
	print(len(ind))
	for i in ind:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	s = input()
	n = len(s)
	ans = [''] * n
	ansn = 0
	i = 0
	while i < n:
		if i < n - 2:
			if i < n - 4 and s[i:i + 5] == 'twone':
				ans[i + 2] = str(i + 3) + ' '
				ansn += 1
				i += 4
			elif i < n - 2 and (s[i:i + 3] == 'one' or s[i:i + 3] == 'two'):
				ans[i + 1] = str(i + 2) + ' '
				ansn += 1
				i += 2
		i += 1
	print(ansn)
	print(''.join(ans))


for w in range(int(input())):
	s = str(input())
	l = []
	l1 = []
	ans = 0
	i = 0
	n = len(s)
	while i <= n - 3:
		if s[i] == 'o' and s[i + 1] == 'n' and (s[i + 2] == 'e'):
			ans += 1
			l.append(i + 1)
			i += 3
		elif s[i] == 't' and s[i + 1] == 'w' and (s[i + 2] == 'o'):
			if i <= n - 5:
				if s[i + 3] == 'n' and s[i + 4] == 'e':
					ans += 1
					l.append(i + 2)
					i += 5
				else:
					ans += 1
					l.append(i + 1)
					i += 3
			else:
				ans += 1
				l.append(i + 1)
				i += 3
		else:
			i += 1
	print(ans)
	for i in range(len(l)):
		print(l[i] + 1, end=' ')
	print()


for _ in range(int(input())):
	l = list(input())
	ans = 0
	for t in range(2, len(l) - 2):
		if l[t] == 'o' and l[t - 1] == 'w' and (l[t - 2] == 't'):
			if l[t + 1] == 'n' and l[t + 2] == 'e':
				ans += 1
				l[t] = '1'
	for t in range(1, len(l) - 1):
		if l[t] == 'n' and l[t - 1] == 'o' and (l[t + 1] == 'e'):
			ans += 1
			l[t] = '1'
		if l[t] == 'w' and l[t - 1] == 't' and (l[t + 1] == 'o'):
			ans += 1
			l[t] = '1'
	print(ans)
	for t in range(len(l)):
		if l[t] == '1':
			print(t + 1, end=' ')
	print()


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		l = list(input())
		(s1, s2, s3) = ('one', 'two', 'twone')
		(i, n) = (0, len(l))
		ans_path = []
		while i < n:
			if i + 4 < n:
				t = ''.join(l[i:i + 5])
				if t == s3:
					ans_path.append(i + 2)
					i += 5
				else:
					t = ''.join(l[i:i + 3])
					if t == s1 or t == s2:
						ans_path.append(i + 1)
						i += 3
					else:
						i += 1
			elif i + 2 < n:
				t = ''.join(l[i:i + 3])
				if t == s1 or t == s2:
					ans_path.append(i + 1)
					i += 3
				else:
					i += 1
			else:
				break
		print(len(ans_path))
		for x in ans_path:
			print(x + 1, end=' ')
		print()
	except:
		pass
M = 998244353
P = 1000000007
Ma = 100000000000
for _ in range(I()):
	main()


t = int(input())
for _ in range(t):
	s = input()
	i = 0
	R = []
	while i < len(s):
		if i + 4 < len(s) and s[i:i + 5] == 'twone':
			R.append(i + 2 + 1)
			i += 5
		elif i + 2 < len(s) and (s[i:i + 3] == 'one' or s[i:i + 3] == 'two'):
			R.append(i + 1 + 1)
			i += 3
		else:
			i += 1
	print(len(R))
	for i in R:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	s = input()
	one = s.count('one')
	two = s.count('two')
	twone = s.count('twone')
	ans = one + two - twone
	l = []
	i = 0
	while i < len(s) - 2:
		if s[i:i + 3] == 'one':
			l.append(i + 1)
			i += 3
		elif i + 4 < len(s) and s[i:i + 5] == 'twone':
			l.append(i + 2)
			i += 5
		elif s[i:i + 3] == 'two':
			l.append(i + 1)
			i += 3
		else:
			i += 1
	print(ans)
	[print(i + 1, end=' ') for i in l]
	print()


for _ in [0] * int(input()):
	s = input()
	i = 0
	r = []
	while i < len(s):
		if 'twone' == s[i:i + 5]:
			i += 3
			r.append(i)
			continue
		if s[i:i + 3] in ('one', 'two'):
			r.append(i + 2)
			i += 1
			continue
		i += 1
	print(len(r))
	for i in r:
		print(i, end=' ')
	print()


import math
t = int(input())
for i in range(t):
	s = input()
	n = len(s)
	p = s.count('one') + s.count('two') - s.count('twone')
	print(p)
	if p == 0:
		print()
	else:
		j = 0
		while j < n - 2:
			if s[j] == 'o' and s[j + 1] == 'n' and (s[j + 2] == 'e'):
				print(j + 2, end=' ')
				j += 3
			elif j < n - 4 and s[j] == 't' and (s[j + 1] == 'w') and (s[j + 2] == 'o') and (s[j + 3] == 'n') and (s[j + 4] == 'e'):
				print(j + 3, end=' ')
				j += 5
			elif s[j] == 't' and s[j + 1] == 'w' and (s[j + 2] == 'o'):
				print(j + 2, end=' ')
				j += 3
			else:
				j += 1
		print()


t = int(input())
l2 = []
for i in range(t):
	s = input()
	k = list(s)
	c = 0
	l1 = []
	c1 = 0
	while c1 < len(k) - 2:
		if s[c1:c1 + 3] == 'one':
			l1.append(c1 + 2)
			c1 += 3
			c += 1
		elif s[c1:c1 + 3] == 'two':
			if s[c1 + 2:c1 + 5] == 'one':
				l1.append(c1 + 3)
				c1 += 5
				c += 1
			else:
				l1.append(c1 + 2)
				c1 += 3
				c += 1
		else:
			c1 += 1
			pass
	l1.append(c)
	l2.append(l1)
for k in range(t):
	print(l2[k][len(l2[k]) - 1])
	for i in range(len(l2[k]) - 1):
		print(l2[k][i], end=' ')
	print()


t = int(input())
Ans = ''
for p in range(t):
	s = input()
	l = len(s)
	i = 0
	ans = 0
	ind = ''
	while i < len(s) - 2:
		if i + 4 < len(s) and s[i:i + 5] == 'twone':
			ind += str(i + 3) + ' '
			ans += 1
			i += 5
		elif i + 2 < len(s) and s[i:i + 3] == 'one':
			ind += str(i + 2) + ' '
			ans += 1
			i += 3
		elif i + 2 < len(s) and s[i:i + 3] == 'two':
			ind += str(i + 2) + ' '
			ans += 1
			i += 3
		else:
			i += 1
	Ans += str(ans) + '\n' + ind + '\n'
print(Ans)


for _ in range(int(input())):
	s = list(input())
	ans = []
	n = len(s)
	a = 0
	if len(s) < 3:
		print(0)
		print('')
	else:
		i = 0
		while i < n - 2:
			if s[i] + s[i + 1] + s[i + 2] == 'one':
				ans.append(i + 1)
				a += 1
				i += 3
			elif s[i] + s[i + 1] + s[i + 2] == 'two':
				if i + 4 < n and s[i + 3] + s[i + 4] == 'ne':
					ans.append(i + 2)
					a += 1
					i += 5
				else:
					ans.append(i + 1)
					i += 3
					a += 1
			else:
				i += 1
		print(a)
		for i in ans:
			print(i + 1, end=' ')
		print('')


T = int(input())

def solve(s):
	s = [i for i in s]
	pos = []
	N = len(s)
	for i in range(N - 2):
		if i + 4 < N and s[i] == 't' and (s[i + 1] == 'w') and (s[i + 2] == 'o') and (s[i + 3] == 'n') and (s[i + 4] == 'e'):
			pos.append(i + 2)
			s[i + 2] = 'k'
		elif s[i] == 'o' and s[i + 1] == 'n' and (s[i + 2] == 'e'):
			pos.append(i + 1)
			s[i + 1] = 'k'
		elif s[i] == 't' and s[i + 1] == 'w' and (s[i + 2] == 'o'):
			pos.append(i + 1)
			s[i + 1] = 'k'
	print(len(pos))
	for i in pos:
		print(i + 1, end=' ')
	print('')
for i in range(T):
	solve(input())


t = int(input())
for i in range(t):
	s = input()
	l = len(s)
	rem = []
	ans = 0
	skip = 0
	for j in range(l - 2):
		if skip > 0:
			skip -= 1
			continue
		if j <= l - 5 and s[j:j + 5] == 'twone':
			ans += 1
			rem.append(j + 3)
			skip = 4
		elif s[j:j + 3] == 'two':
			ans += 1
			rem.append(j + 2)
		elif s[j:j + 3] == 'one':
			ans += 1
			rem.append(j + 2)
	print(ans)
	if ans == 0:
		print()
	else:
		for j in rem:
			print(j, end=' ')
		print()


import sys, math, bisect
input = sys.stdin.readline
from random import randint
inf = float('inf')
mod = 10 ** 9 + 7

def lcm(a, b):
	return int(a / math.gcd(a, b) * b)

def gcd(a, b):
	return int(math.gcd(a, b))

def tobinary(n):
	return bin(n)[2:]

def binarySearch(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	else:
		return -1

def lowerBound(a, x):
	i = bisect.bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def upperBound(a, x):
	i = bisect.bisect_right(a, x)
	if i != len(a) + 1 and a[i - 1] == x:
		return i - 1
	else:
		return -1

def primesInRange(n):
	ans = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			ans.append(p)
	return ans

def primeFactors(n):
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n = n // i
	if n > 2:
		factors.append(n)
	return factors

def isPrime(n, k=5):
	if n < 2:
		return True
	for i in range(0, k):
		a = randint(1, n - 1)
		if pow(a, n - 1, n) != 1:
			return False
	return True
from collections import deque, defaultdict, Counter
import heapq, string
for _ in range(int(input())):
	s = input()
	n = len(s)
	dp = [0] * n
	for i in range(2, n - 2):
		if s[i] == 'o':
			if [s[i - 1], s[i - 2]] == ['w', 't'] and [s[i + 1], s[i + 2]] == ['n', 'e']:
				if sum(dp[i - 2:i + 2]) == 0:
					dp[i] = 1
	for i in range(2, n):
		if s[i] == 'o':
			if [s[i - 1], s[i - 2]] == ['w', 't']:
				if sum(dp[i - 2:i + 1]) == 0:
					dp[i - 1] = 1
	for i in range(2, n):
		if s[i] == 'e':
			if [s[i - 1], s[i - 2]] == ['n', 'o']:
				if sum(dp[i - 2:i + 1]) == 0:
					dp[i - 1] = 1
	print(sum(dp))
	for i in range(n):
		if dp[i] == 1:
			print(i + 1, end=' ')
	print()


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	s = stdin.readline()[:-1]
	lst = []
	n = len(s)
	i = 1
	while i < n - 1:
		if s[i] == 'o' and (i > 1 and i < n - 2):
			if s[i + 1:i + 3] == 'ne' and s[i - 2:i] == 'tw':
				lst.append(i)
				i += 2
		elif s[i] == 'n':
			if s[i - 1:i + 2] == 'one':
				lst.append(i)
				i += 1
		elif s[i] == 'w':
			if s[i - 1:i + 2] == 'two':
				lst.append(i)
		i += 1
	length = len(lst)
	for i in range(1, length):
		if lst[i] - lst[i - 1] == 1:
			lst[i - 1] = 0
			length -= 1
	stdout.write(str(length) + '\n')
	for i in lst:
		if i:
			stdout.write(str(i + 1) + ' ')
	stdout.write('\n')


t = int(input())
i = 0
while i < t:
	s = input()
	s = list(s)
	s.append(1)
	s.append(1)
	n = len(s)
	ans = []
	for x in range(n - 2):
		if s[x] == 'o' and s[x + 1] == 'n' and (s[x + 2] == 'e'):
			ans.append(x + 1)
			s[x + 1] = 1
		elif s[x] == 't' and s[x + 1] == 'w' and (s[x + 2] == 'o'):
			if s[x + 3] == 'n' and s[x + 4] == 'e':
				ans.append(x + 2)
				s[x + 2] = 1
			else:
				ans.append(x + 1)
				s[x + 1] = 1
	print(len(ans))
	for x in ans:
		print(x + 1, end=' ')
	print()
	i = i + 1


for _ in range(int(input())):
	s = input()
	pos = 0
	a = []
	while pos < len(s):
		if pos + 2 < len(s) and s[pos] == 'o' and (s[pos + 1] == 'n') and (s[pos + 2] == 'e'):
			a.append(pos + 2)
			pos += 3
		elif pos + 2 < len(s) and s[pos] == 't' and (s[pos + 1] == 'w') and (s[pos + 2] == 'o'):
			if pos + 4 < len(s) and s[pos + 3] == 'n' and (s[pos + 4] == 'e'):
				a.append(pos + 3)
				pos += 5
			else:
				a.append(pos + 2)
				pos += 3
		else:
			pos += 1
	print(len(a))
	for i in range(0, len(a)):
		print(a[i], end=' ')
	print()


t = int(input())
for i in range(0, t):
	a = []
	s = input()
	j = 0
	while j < len(s):
		if s[j] == 't':
			if j + 4 < len(s) and s[j:j + 5] == 'twone':
				a.append(j + 3)
				j += 4
			elif j + 2 < len(s) and s[j:j + 3] == 'two':
				a.append(j + 2)
				j += 2
		elif s[j] == 'o':
			if j + 2 < len(s) and s[j:j + 3] == 'one':
				a.append(j + 2)
				j += 2
		j += 1
	if len(a) == 0:
		print(0)
	else:
		print(len(a))
		for j in range(0, len(a)):
			print(a[j], end=' ')
	print()


t = int(input())
for _ in range(t):
	s = input()
	ind = []
	n = len(s)
	tot = 0
	ans = set()
	for i in range(n - 2):
		if s[i:i + 3] == 'one':
			tot += 1
			ans.add(i + 1)
		if s[i:i + 3] == 'two':
			tot += 1
			ans.add(i + 1)
	for i in range(n - 4):
		if s[i:i + 5] == 'twone':
			tot -= 1
			ans.remove(i + 1)
			ans.remove(i + 3)
			ans.add(i + 2)
	print(tot)
	for i in ans:
		print(i + 1, end=' ')
	print()
	continue
	tt = []
	oo = []
	for i in range(0, n):
		if s[i] == 't':
			try:
				tt.append(tt[-1] + 1)
			except:
				tt.append(1)
		else:
			tt.append(0)
		if s[i] == 'o':
			try:
				oo.append(tt[-1] + 1)
			except:
				oo.append(1)
		else:
			oo.append(0)
	oo2 = [0] * n
	ee = [0] * n
	for i in range(n - 1, -1, -1):
		if s[i] == 'o':
			try:
				oo2[i] = 1 + oo[i + 1]
			except:
				oo2[i] = 1
		else:
			oo2[i] = 0
		if s[i] == 'e':
			try:
				ee[i] = 1 + ee[i + 1]
			except:
				ee[i] = 1
		else:
			ee[i] = 0
	tot = 0
	for i in range(n - 2):
		if s[i:i + 3] == 'one':
			tot += min(oo[i], ee[i + 2])
		elif s[i:i + 3] == 'two':
			tot += min(tt[i], oo2[i + 2])
	st = 0
	for i in range(n):
		if i < n - 1:
			if s[i:i + 2] == 'tw':
				st = 1
				ind = i
		if st and s[i] == 'o':
			st += 1
		if st and s[i] != 'o':
			if i < n - 1:
				if s[i:i + 2] == 'ne' and st > 1:
					ans = 0
					ans += min(tt[ind], oo2[ind + 2])
					ans += min(ee[i + 1], oo[i - 1])
					if st - 1 < ans:
						tot -= ans
						tot += st - 1
			st = 0
	print(tot)


for _ in range(int(input())):
	s = input()
	i = 0
	c = 0
	l = []
	while i < len(s):
		if s[i:i + 3] == 'one':
			c += 1
			l.append(i + 2)
		elif s[i:i + 3] == 'two':
			if i + 4 < len(s):
				if s[i + 3] == 'n' and s[i + 4] == 'e':
					c += 1
					l.append(i + 3)
					i += 2
				else:
					c += 1
					l.append(i + 2)
			else:
				c += 1
				l.append(i + 2)
		i += 1
	print(c)
	for j in l:
		print(j, end=' ')
	print()


from sys import stdin, stdout
(ans, pos) = ([], 0)
for i in range(int(input())):
	s = stdin.readline()
	(cnt, j, l) = (0, 0, len(s) - 2)
	while j <= l - 2:
		tmp = s[j] + s[j + 1] + s[j + 2]
		if j <= l - 4 and tmp + s[j + 3] + s[j + 4] == 'twone':
			ans.append(str(j + 3))
			ans.append(' ')
			cnt += 1
			j += 5
		elif tmp in ['one', 'two']:
			ans.append(str(j + 2))
			ans.append(' ')
			cnt += 1
			j += 3
		else:
			j += 1
	ans.append('\n')
	ans.insert(pos, str(cnt))
	ans.insert(pos + 1, '\n')
	pos = len(ans)
stdout.write(''.join(ans))


t = int(input())
for ti in range(t):
	indices = []
	s = input()
	i = 0
	while i < len(s):
		if s[i] == 'o' and s[i:i + 3] == 'one':
			indices += [i + 1]
			i += 3
			continue
		elif s[i] == 't':
			if s[i:i + 5] == 'twone':
				indices += [i + 2]
				i += 5
			elif s[i:i + 3] == 'two':
				indices += [i + 1]
				i += 3
			else:
				i += 1
			continue
		i += 1
	print(len(indices))
	for i in indices:
		print(i + 1, end=' ')
	print()


t = int(input())
for i in range(t):
	s = str(input())
	arr = []
	s += '111'
	j = 0
	while j <= len(s) - 2:
		q = s[j:j + 3]
		p = s[j + 2:j + 5]
		if q == 'one':
			arr.append(j + 2)
			j += 3
		elif q == 'two':
			if p == 'one':
				arr.append(j + 3)
				j += 5
			else:
				arr.append(j + 2)
				j += 3
		else:
			j += 1
	print(len(arr))
	for j in range(len(arr)):
		print(arr[j], end=' ')
	print()


import math
y = int(input())
while y > 0:
	y -= 1
	s = input()
	i = 0
	ans = 0
	l = []
	while i < len(s):
		if i + 5 <= len(s) and s[i:i + 5] == 'twone':
			l.append(i + 2)
			ans += 1
			i += 5
		elif i + 3 <= len(s) and s[i:i + 3] == 'two':
			l.append(i + 1)
			ans += 1
			i += 3
		elif i + 3 <= len(s) and s[i:i + 3] == 'one':
			l.append(i + 1)
			ans += 1
			i += 3
		else:
			i += 1
	print(ans)
	for j in l:
		print(j + 1, end=' ')
	print()


n = int(input())
for i in range(n):
	z = input() + '  '
	x = len(z)
	a = []
	q = 0
	w = 0
	while q < x - 2:
		if z[q:q + 3] == 'one':
			a.append(q + 2)
			q += 2
			w += 1
		elif z[q:q + 3] == 'two':
			if z[q + 2:q + 5] == 'one':
				a.append(q + 3)
			else:
				a.append(q + 2)
			q += 2
			w += 1
		q += 1
	print(w)
	for i in range(w):
		print(a[i], end=' ')
	print()


def solve():
	s = input()
	l = len(s)
	i = 0
	ans = []
	while i < l:
		if i + 5 <= l:
			if s[i:i + 5] == 'twone':
				ans.append(i + 3)
				i += 4
				continue
		if i + 3 <= l:
			if s[i:i + 3] == 'two' or s[i:i + 3] == 'one':
				ans.append(i + 2)
				i += 2
		i += 1
	print(len(ans))
	for a in ans:
		print(a, end=' ')
	print()
t = int(input())
while t > 0:
	solve()
	t -= 1


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase

def I():
	return int(input())

def In():
	return map(int, input().split())

def main():
	T = I()
	for _ in range(T):
		l = list(input())
		(s1, s2, s3) = ('one', 'two', 'twone')
		(i, n) = (0, len(l))
		ans_path = []
		while i < n:
			if i + 4 < n:
				t = ''.join(l[i:i + 5])
				if t == s3:
					ans_path.append(i + 2)
					i += 5
				else:
					t = ''.join(l[i:i + 3])
					if t == s1 or t == s2:
						ans_path.append(i + 1)
						i += 3
					else:
						i += 1
			elif i + 2 < n:
				t = ''.join(l[i:i + 3])
				if t == s1 or t == s2:
					ans_path.append(i + 1)
					i += 3
				else:
					i += 1
			else:
				break
		print(len(ans_path))
		for x in ans_path:
			print(x + 1, end=' ')
		print()
BUFSIZE = 8192
P = 1000000007

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	g = []
	s = input()
	n = len(s)
	i = 0
	while i < n - 3 + 1:
		if i + 5 <= n:
			if s[i:i + 5] == 'twone':
				g.append(i + 3)
				i += 5
				continue
		if s[i:i + 3] == 'one':
			g.append(i + 2)
			i += 3
		elif s[i:i + 3] == 'two':
			g.append(i + 2)
			i += 3
		else:
			i += 1
	print(len(g))
	for i in g:
		print(i, end=' ')
	print()


import sys
readline = sys.stdin.readline
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
for _ in range(ni()):
	s = ns()
	ind = []
	i = 0
	while i < len(s) - 2:
		if s[i] == 'o':
			if s[i + 1] == 'n' and s[i + 2] == 'e':
				ind.append(i + 1)
				i += 2
		elif s[i] == 't':
			if i < len(s) - 4 and s[i + 1] == 'w' and (s[i + 2] == 'o') and (s[i + 3] == 'n') and (s[i + 4] == 'e'):
				ind.append(i + 2)
				i += 4
			elif s[i + 1] == 'w' and s[i + 2] == 'o':
				ind.append(i + 1)
				i += 2
		i += 1
	print(len(ind))
	for i in ind:
		print(i + 1, end=' ')
	print()


for _ in range(int(input())):
	s = input()
	a = []
	for i in s:
		a.append(i)
	a.append(1)
	a.append(1)
	a.append(1)
	n = len(s)
	if n <= 2:
		print(0)
		print('')
		continue
	ans = []
	for i in range(0, n - 2):
		if [a[i], a[i + 1], a[i + 2]] == ['o', 'n', 'e']:
			ans.append(i + 2)
			a[i + 1] = 1
		elif [a[i], a[i + 1], a[i + 2]] == ['t', 'w', 'o']:
			if a[i + 3] == 'n' and a[i + 4] == 'e':
				ans.append(i + 3)
				a[i + 2] = 1
			else:
				ans.append(i + 2)
				a[i + 1] = 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	s = input()
	if len(s) < 3:
		print(0)
		continue
	ans = []
	for i in range(len(s)):
		if i < 2:
			if s[i:i + 3] == 'one':
				ans.append(i + 1)
		elif i + 2 < len(s) and s[i - 2:i + 3] == 'twone':
			ans.append(i)
		elif s[i - 2:i + 1] == 'two':
			ans.append(i - 1)
		elif i + 2 < len(s) and s[i:i + 3] == 'one':
			ans.append(i + 1)
	ans.sort()
	print(len(ans))
	for j in ans:
		print(j + 1, end=' ')
	print(end='\n')