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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.w: E = None
        self.q: B = None
        self.p: I = None
        self.t: C = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: F = None
        self.t: A = None
        self.q: B = None
        self.u: G = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.x: A = None
        self.o: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: A = None
        self.q: F = None
        self.o: B = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.r: E = None
        self.txt = txt

m = A("m")
f = B("f")
h = C("h")
k = D("k")
l = E("l")
e = F("e")
a = G("a")
n = H("n")
j = I("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.w: E = None
        self.q: B = None
        self.p: I = None
        self.t: C = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: F = None
        self.t: A = None
        self.q: B = None
        self.u: G = None
        self.s: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.x: A = None
        self.o: B = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: A = None
        self.q: F = None
        self.o: B = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.r: E = None
        self.txt = txt

m = A("m")
f = B("f")
h = C("h")
k = D("k")
l = E("l")
e = F("e")
a = G("a")
n = H("n")
j = I("j")

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