I would most likely freak out. My friend randomly hugged me once when I didn't know she was there and I was just walking around on my own. I didn't know who it was and punched her in the face. So please don't hug me randomly.
I'd probably be surprised, just stand there and look at あなた all blank and if あなた didn't say anything after a while I'd probably just walk off after a while.