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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.z: A = None
        self.w: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

i.x = d
i.z = j
i.s = j
i.r = n
i.p = b
f.z = e
f.p = e
n.p = b
n.x = k
n.z = a
n.r = a
n.w = i
k.z = f
k.u = l
k.t = i
d.u = f
d.t = f
d.s = j
l.p = e
l.x = k
l.z = i
l.r = i
l.w = a
e.p = n
e.x = j
e.z = a
e.w = i
e.r = i
b.p = l
b.x = k
b.z = a
b.w = a
b.r = a
j.z = f
j.u = b
j.t = i
a.x = d
a.z = k
a.r = l
a.p = l
a.s = j
assert l.w.x.u.p.w.x.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: D = None
        self.r: C = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.z: A = None
        self.w: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

i.x = d
i.z = j
i.s = j
i.r = n
i.p = b
f.z = e
f.p = e
n.p = b
n.x = k
n.z = a
n.r = a
n.w = i
k.z = f
k.u = l
k.t = i
d.u = f
d.t = f
d.s = j
l.p = e
l.x = k
l.z = i
l.r = i
l.w = a
e.p = n
e.x = j
e.z = a
e.w = i
e.r = i
b.p = l
b.x = k
b.z = a
b.w = a
b.r = a
j.z = f
j.u = b
j.t = i
a.x = d
a.z = k
a.r = l
a.p = l
a.s = j
assert l.w.x.u.p.w.x.s.z.txt == "f"