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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: I = None
        self.v: A = None
        self.z: B = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.o: F = None
        self.z: B = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: I = None
        self.v: A = None
        self.z: B = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.o: F = None
        self.z: B = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

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