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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.y: G = None
        self.w: D = None
        self.o: B = None
        self.u: A = None
        self.p: C = None
        self.q: B = None
        self.txt = txt

a = A("a")
c = B("c")
g = C("g")
l = D("l")
m = E("m")
d = F("d")
b = G("b")
j = H("j")
k = F("k")
h = D("h")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.t: F = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.y: G = None
        self.w: D = None
        self.o: B = None
        self.u: A = None
        self.p: C = None
        self.q: B = None
        self.txt = txt

a = A("a")
c = B("c")
g = C("g")
l = D("l")
m = E("m")
d = F("d")
b = G("b")
j = H("j")
k = F("k")
h = D("h")

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