Here is how your words should be sorted:
-ck ck ic x oddball
shock chicken magic relax stomach
quick pocket attic index
hammock nickel traffic perplex
attack pickle topic complex
buckle metric
ticket electric
fabric
plastic
Note that stomach is an oddball because it has the /k/ sound at the end, but is spelled with a ch.