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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.p: H = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.p: H = None
        self.v: F = None
        self.o: E = None
        self.x: F = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.u: D = None
        self.q: B = None
        self.s: A = None
        self.w: B = None
        self.v: G = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.txt = txt

a = A("a")
j = B("j")
h = C("h")
c = D("c")
f = E("f")
m = F("m")
d = G("d")
i = H("i")
l = G("l")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.p: H = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.p: H = None
        self.v: F = None
        self.o: E = None
        self.x: F = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.u: D = None
        self.q: B = None
        self.s: A = None
        self.w: B = None
        self.v: G = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.txt = txt

a = A("a")
j = B("j")
h = C("h")
c = D("c")
f = E("f")
m = F("m")
d = G("d")
i = H("i")
l = G("l")

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