2 added 3 characters in body
source | link

Python 2, 100 9898 95 bytes

f=lambda s,p='':s and f(s[1:],p[x(s[0])[p[x:]+p[:x(s[0])]+s[0])orx]+s[0]for p
x=lambdax c:cin[s[0].isupper()-cs[0].islower()]][0])or p

Try it online!Try it online!

Python 2, 100 98 bytes

f=lambda s,p='':s and f(s[1:],p[x(s[0]):]+p[:x(s[0])]+s[0])or p
x=lambda c:c.isupper()-c.islower()

Try it online!

Python 2, 100 98 95 bytes

f=lambda s,p='':s and f(s[1:],[p[x:]+p[:x]+s[0]for x in[s[0].isupper()-s[0].islower()]][0])or p

Try it online!

1
source | link

Python 2, 100 98 bytes

f=lambda s,p='':s and f(s[1:],p[x(s[0]):]+p[:x(s[0])]+s[0])or p
x=lambda c:c.isupper()-c.islower()

Try it online!