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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.q: G = None
        self.p: G = None
        self.x: I = None
        self.v: G = None
        self.y: D = None
        self.o: G = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.q: A = None
        self.x: I = None
        self.y: C = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: A = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.q: G = None
        self.p: G = None
        self.x: I = None
        self.v: G = None
        self.y: D = None
        self.o: G = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.q: A = None
        self.x: I = None
        self.y: C = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: A = None
        self.t: B = None
        self.txt = txt

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

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