Evaluate Melodic Similarity

Listen to the following original melody:

And now to these two variations:

Which melody is more similar to the original one?
Variation A.
Variation B.
They are both equally similar or dissimilar to the original melody.

NOTE: If one melody is part of another one, they shall be considered equally similar.

Optional:

Do you have a strong musical background? Which one and for how long?

Do you have any comments or suggestions? We appreciate your input!