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

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

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

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

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

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

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

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

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

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

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

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

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