function T = mergeCycles(T, U)
% part of eulerWalk. T and U are cycles in a graph that overlap at A.
% just insert U at A in T and you have a longer cycle.
overlapi = find(T==U(1));
T = [T(1:overlapi); U(2:end-1); T(overlapi:end)];
