This problem was far too painful, had too many stupid mistakes.