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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: A = None
        self.u: C = None
        self.o: A = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: A = None
        self.u: C = None
        self.o: A = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.u: E = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

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

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

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