class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.w: C = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.txt = txt

j = A("j")
a = B("a")
l = C("l")
g = D("g")
c = E("c")
n = D("n")

j.v = l
j.r = l
j.w = l
j.q = g
a.w = l
l.o = n
l.s = c
l.z = c
g.u = c
g.y = a
g.x = n
g.w = l
c.t = g
c.v = l
n.u = c
n.y = a
n.x = g
n.w = l
assert g.u.v.o.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.w: C = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: C = None
        self.txt = txt

j = A("j")
a = B("a")
l = C("l")
g = D("g")
c = E("c")
n = D("n")

j.v = l
j.r = l
j.w = l
j.q = g
a.w = l
l.o = n
l.s = c
l.z = c
g.u = c
g.y = a
g.x = n
g.w = l
c.t = g
c.v = l
n.u = c
n.y = a
n.x = g
n.w = l
assert g.u.v.o.u.v.txt == "l"