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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: D = None
        self.s: I = None
        self.q: I = None
        self.y: H = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.w: A = None
        self.y: G = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.x: H = None
        self.u: E = None
        self.r: D = None
        self.t: I = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: D = None
        self.s: I = None
        self.q: I = None
        self.y: H = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.w: A = None
        self.y: G = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.x: H = None
        self.u: E = None
        self.r: D = None
        self.t: I = None
        self.s: D = None
        self.txt = txt

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

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

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

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