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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.s: A = None
        self.p: H = None
        self.r: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.s: A = None
        self.p: H = None
        self.r: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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