class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: G = None
        self.u: H = None
        self.w: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.x: G = None
        self.v: E = None
        self.y: A = None
        self.p: B = None
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: G = None
        self.u: H = None
        self.w: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.x: G = None
        self.v: E = None
        self.y: A = None
        self.p: B = None
        self.w: E = None
        self.txt = txt

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

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