My ugly version of EulerianCycle problem algorithm