Extended Euclidean algorithm

Extended Euclidean algorithm added :P