class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.s: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

i = A("i")
e = B("e")
d = C("d")
c = D("c")
k = E("k")
g = E("g")
m = B("m")
l = D("l")
n = C("n")

i.x = c
i.q = c
i.s = m
i.r = e
e.p = g
e.s = m
e.v = k
d.w = g
d.p = l
d.x = c
d.s = k
c.y = d
c.q = e
c.x = e
c.t = g
k.x = g
k.p = g
k.u = d
k.v = d
g.x = k
g.p = k
g.u = d
g.v = n
m.p = g
m.v = g
m.s = e
l.y = d
l.q = m
l.t = k
l.x = e
n.w = k
n.p = l
n.x = l
n.s = g
assert i.r.v.u.p.t.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.s: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

i = A("i")
e = B("e")
d = C("d")
c = D("c")
k = E("k")
g = E("g")
m = B("m")
l = D("l")
n = C("n")

i.x = c
i.q = c
i.s = m
i.r = e
e.p = g
e.s = m
e.v = k
d.w = g
d.p = l
d.x = c
d.s = k
c.y = d
c.q = e
c.x = e
c.t = g
k.x = g
k.p = g
k.u = d
k.v = d
g.x = k
g.p = k
g.u = d
g.v = n
m.p = g
m.v = g
m.s = e
l.y = d
l.q = m
l.t = k
l.x = e
n.w = k
n.p = l
n.x = l
n.s = g
assert i.r.v.u.p.t.u.s.txt == "k"