Automatic rack transfer machine