class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.s: E = None
        self.q: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.x: A = None
        self.t: H = None
        self.v: G = None
        self.s: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.x: G = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.x: A = None
        self.t: H = None
        self.v: G = None
        self.s: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: B = None
        self.x: G = None
        self.y: E = None
        self.txt = txt

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

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