Step 1: Identify the applicable legal doctrine.
The Scienter Rule applies to animals: an owner of a domesticated animal is strictly liable for damage caused if they had prior knowledge (scienter) of the animal's dangerous or ferocious propensity; no proof of negligence is required.
Step 2: Apply the Scienter Rule to X and Y separately.
Y's dog is described as "ferocious" so scienter is established for Y; X's dog has no stated dangerous history or known ferocious propensity, so the Scienter Rule cannot be applied to X; Y is strictly liable, X is not.
Step 3: Determine who Z can sue.
Z was injured while trying to avoid Y's ferocious dog; Z can sue only Y under the Scienter doctrine, as Y's prior knowledge of the dog's dangerous nature makes Y strictly liable for injuries it causes.
\[ \boxed{\text{Y only}} \]