class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.q: C = None
        self.w: B = None
        self.u: B = None
        self.v: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.txt = txt

l = A("l")
m = B("m")
g = C("g")
f = D("f")
b = E("b")
d = F("d")
a = G("a")
j = H("j")
n = E("n")

l.z = j
l.t = g
m.v = j
m.y = j
m.q = d
g.u = l
g.r = l
g.q = d
g.w = d
g.o = a
g.y = m
g.t = m
f.w = m
b.p = g
d.u = f
d.t = g
d.r = m
d.s = m
d.w = n
d.o = n
d.y = b
a.y = m
a.w = m
a.u = m
a.v = m
a.p = g
a.q = g
a.o = f
j.w = a
j.p = m
n.p = g
assert a.q.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: C = None
        self.q: C = None
        self.w: B = None
        self.u: B = None
        self.v: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.txt = txt

l = A("l")
m = B("m")
g = C("g")
f = D("f")
b = E("b")
d = F("d")
a = G("a")
j = H("j")
n = E("n")

l.z = j
l.t = g
m.v = j
m.y = j
m.q = d
g.u = l
g.r = l
g.q = d
g.w = d
g.o = a
g.y = m
g.t = m
f.w = m
b.p = g
d.u = f
d.t = g
d.r = m
d.s = m
d.w = n
d.o = n
d.y = b
a.y = m
a.w = m
a.u = m
a.v = m
a.p = g
a.q = g
a.o = f
j.w = a
j.p = m
n.p = g
assert a.q.t.y.txt == "j"