Iraq, Afghan wars to cost U.S. up to $6 trillion