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

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

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

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

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

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

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

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

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

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

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

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

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