class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.s: F = None
        self.w: F = None
        self.p: G = None
        self.u: I = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.r: D = None
        self.q: D = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.r: D = None
        self.q: D = None
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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