class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.o: A = None
        self.v: A = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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