class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.z: C = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.u: D = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

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

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

b = A("b")
c = B("c")
j = C("j")
m = D("m")
i = E("i")
f = C("f")
h = D("h")
d = A("d")
a = B("a")

b.q = i
b.t = i
b.z = j
b.s = f
b.y = d
c.o = h
c.q = d
c.w = d
c.r = a
j.x = d
j.v = b
j.u = h
j.r = f
j.o = f
m.t = f
m.v = f
m.z = j
m.w = i
m.u = h
i.t = b
f.x = b
f.v = b
f.u = h
f.r = j
f.o = j
h.t = j
h.z = f
h.v = f
h.w = i
h.u = m
d.q = i
d.t = i
d.z = j
d.s = j
d.y = b
a.o = h
a.q = d
a.w = b
a.r = c
assert b.y.s.u.t.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.z: C = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: A = None
        self.u: D = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

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

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

b = A("b")
c = B("c")
j = C("j")
m = D("m")
i = E("i")
f = C("f")
h = D("h")
d = A("d")
a = B("a")

b.q = i
b.t = i
b.z = j
b.s = f
b.y = d
c.o = h
c.q = d
c.w = d
c.r = a
j.x = d
j.v = b
j.u = h
j.r = f
j.o = f
m.t = f
m.v = f
m.z = j
m.w = i
m.u = h
i.t = b
f.x = b
f.v = b
f.u = h
f.r = j
f.o = j
h.t = j
h.z = f
h.v = f
h.w = i
h.u = m
d.q = i
d.t = i
d.z = j
d.s = j
d.y = b
a.o = h
a.q = d
a.w = b
a.r = c
assert b.y.s.u.t.x.t.txt == "i"