class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.u: E = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.z: A = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

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

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

f = A("f")
m = B("m")
e = C("e")
g = D("g")
j = E("j")
d = E("d")
n = D("n")
i = A("i")
k = C("k")
a = A("a")

f.v = a
f.r = j
f.u = j
f.w = d
f.x = i
m.p = j
e.s = i
e.z = i
e.v = k
e.x = k
e.q = g
g.v = k
g.t = m
j.y = d
j.v = d
j.t = g
d.y = j
d.v = j
d.t = n
n.v = e
n.t = m
i.v = f
i.r = j
i.u = d
i.w = d
i.x = a
k.s = a
k.z = a
k.v = e
k.x = e
k.q = n
a.v = f
a.x = f
a.r = d
a.w = d
a.u = j
assert k.s.x.v.u.t.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.u: E = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.z: A = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

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

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

f = A("f")
m = B("m")
e = C("e")
g = D("g")
j = E("j")
d = E("d")
n = D("n")
i = A("i")
k = C("k")
a = A("a")

f.v = a
f.r = j
f.u = j
f.w = d
f.x = i
m.p = j
e.s = i
e.z = i
e.v = k
e.x = k
e.q = g
g.v = k
g.t = m
j.y = d
j.v = d
j.t = g
d.y = j
d.v = j
d.t = n
n.v = e
n.t = m
i.v = f
i.r = j
i.u = d
i.w = d
i.x = a
k.s = a
k.z = a
k.v = e
k.x = e
k.q = n
a.v = f
a.x = f
a.r = d
a.w = d
a.u = j
assert k.s.x.v.u.t.v.s.txt == "a"