Apes 'can recognise the written word' - and even make plans