Even more simple and straightforward:

substr('ABCDEFG',-3)