class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: F = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.q: E = None
        self.y: E = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

i = A("i")
g = B("g")
m = C("m")
e = D("e")
l = E("l")
j = F("j")
d = G("d")
f = H("f")
k = E("k")
n = F("n")

i.q = l
g.s = d
g.p = e
g.r = l
g.v = i
g.x = i
g.q = f
g.z = m
m.z = j
m.u = k
e.r = i
e.u = i
e.v = n
e.t = n
l.u = f
j.t = i
d.z = n
d.q = n
d.p = m
d.y = m
d.w = l
f.p = d
f.u = m
f.z = m
f.q = k
f.y = k
f.w = g
k.u = f
n.t = i
assert d.z.t.q.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: F = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.q: E = None
        self.y: E = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

i = A("i")
g = B("g")
m = C("m")
e = D("e")
l = E("l")
j = F("j")
d = G("d")
f = H("f")
k = E("k")
n = F("n")

i.q = l
g.s = d
g.p = e
g.r = l
g.v = i
g.x = i
g.q = f
g.z = m
m.z = j
m.u = k
e.r = i
e.u = i
e.v = n
e.t = n
l.u = f
j.t = i
d.z = n
d.q = n
d.p = m
d.y = m
d.w = l
f.p = d
f.u = m
f.z = m
f.q = k
f.y = k
f.w = g
k.u = f
n.t = i
assert d.z.t.q.u.q.txt == "k"