This paper describes an algorithm of interest. This is a preliminary version and we intend on writing a better descripition of it and getting bounds for its complexity.