Head, Shoulders, Knees and Toes, Knees and Toes
JavaScript (ES6), 91 88 87 bytes
n=>'knees,toes,head,shoulders,eyes,ears,mouth,nose'.split`,`[(245890>>(n%22&~1))&6|n%2]
How it works
We have 4 distinct pairs of words that always appear together: 'head' is always followed by 'shoulders', 'knees' is always followed by 'toes', etc.
Therefore, we can use the following index:
00: [ 'knees', 'toes' ]
01: [ 'head', 'shoulders' ]
10: [ 'eyes', 'ears' ]
11: [ 'mouth', 'nose' ]
And compress the whole sequence (in reverse order) into the following binary mask:
00 00 01 11 10 00 00 01 00 00 01
We use [ 'knees', 'toes' ]
as the first pair to get as many leading zeros as possible.
We pad this sequence with an extra 0
so that the extracted value is premultiplied by 2, which leads to:
0b00000111100000010000010 = 245890
Hence the final formula for the correct word:
(245890 >> (n % 22 & ~1)) & 6 | n % 2
Test cases
let f =
n=>'knees,toes,head,shoulders,eyes,ears,mouth,nose'.split`,`[(245890>>(n%22&~1))&6|n%2]
console.log(f(0)); // head
console.log(f(1)); // shoulders
console.log(f(7)); // shoulders
console.log(f(13)); // ears
console.log(f(20)); // knees
console.log(f(35)); // ears
console.log(f(37)); // nose
console.log(f(98)); // knees
console.log(f(543)); // nose
console.log(f(1000)); // knees
05AB1E, 36 35 34 bytes
“‡ä¾ØsÏ©s¸±s“#2䤫Г—íÖÇ©¢ÄÓ#s)˜è
Try it online! or as a Test suite
Explanation
“‡ä¾ØsÏ©s¸±s“ # dictionary string 'head shoulders knees toes'
# # split on spaces
2ä # split in 2 parts
¤ # get the last part ['knees', 'toes']
« # concatenate and flatten
# STACK: [['head', 'shoulders'], ['knees', 'toes'], 'knees', 'toes']
Ð # triplicate
“—íÖÇ©¢ÄÓ # dictionary string 'eyes ears mouth nose'
#s # split on spaces and swap top 2 elements of stack
)˜ # wrap stack in a list and flatten
è # index into list with input
In short, we build the list
['head', 'shoulders', 'knees', 'toes', 'knees', 'toes', 'head', 'shoulders', 'knees', 'toes', 'knees', 'toes', 'eyes', 'ears', 'mouth', 'nose', 'head', 'shoulders', 'knees', 'toes', 'knees', 'toes']
and index into it with input (0-indexed).
Python 2, 158 148 137 128 114 109 104 bytes
Lookup table seems better. Also shortened the big string and reordered the items. -5 bytes thanks to Rod for using string as a list.
c=int('602323'*2+'4517602323'[input()%22])
print"smkteehnhonoyaeooueeerasutesssdelhs"[c::8]+"ders"*(c<1)
initial solution:
n=input()%22
n-=10*(n>15)
if n>=12:n-=8
else:n%=6;n-=2*(n>3)
print"hskteemnehnoyaooaoeeerusduessste ls h d e r s"[n::8].strip()