class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.x: A = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

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