Allegri: Douglas Costa needs time to adapt