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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.r: C = None
        self.t: F = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.w: F = None
        self.x: F = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.o: B = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.r: C = None
        self.t: F = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.w: F = None
        self.x: F = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.o: B = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

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

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