Euler-Mahonian distributions on words