Daniil Medvedev wins 'tough' match to advance at French Open