class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: B = None
        self.q: H = None
        self.w: E = None
        self.z: B = None
        self.t: G = None
        self.r: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.z: F = None
        self.r: C = None
        self.q: D = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: B = None
        self.q: H = None
        self.w: E = None
        self.z: B = None
        self.t: G = None
        self.r: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.z: F = None
        self.r: C = None
        self.q: D = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

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

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

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