class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: E = None
        self.z: H = None
        self.y: I = None
        self.r: G = None
        self.v: F = None
        self.u: G = None
        self.s: G = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.p: F = None
        self.y: C = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: D = None
        self.x: F = None
        self.z: D = None
        self.r: C = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: F = None
        self.o: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.z: B = None
        self.p: C = None
        self.r: F = None
        self.w: A = None
        self.o: A = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.p: F = None
        self.y: C = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: D = None
        self.x: F = None
        self.z: D = None
        self.r: C = None
        self.v: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: F = None
        self.o: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.z: B = None
        self.p: C = None
        self.r: F = None
        self.w: A = None
        self.o: A = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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