sort of infix solution