Knots in a graphene nanoribbon