Elastic wavefield inversion by the alternating update method