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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: G = None
        self.q: A = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.v: F = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.r: I = None
        self.s: I = None
        self.o: B = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

i = A("i")
l = B("l")
n = C("n")
m = D("m")
e = E("e")
b = F("b")
j = G("j")
a = H("a")
g = I("g")
h = B("h")

i.z = n
i.u = n
i.o = j
i.v = j
i.q = l
l.s = m
l.x = j
l.q = i
l.p = e
n.s = i
n.o = i
n.v = b
n.u = e
n.x = h
m.v = g
e.z = i
e.t = m
e.r = g
e.s = g
e.v = g
e.o = h
b.q = h
j.v = n
a.w = m
a.y = m
a.u = m
a.r = b
a.s = h
a.o = e
a.v = e
a.x = n
a.p = g
g.s = l
g.x = a
g.p = n
g.q = j
g.r = j
g.u = i
g.z = m
g.v = b
g.w = b
h.s = m
h.x = j
h.q = i
h.p = e
assert n.u.v.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.o: G = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: G = None
        self.q: A = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: A = None
        self.v: F = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.r: I = None
        self.s: I = None
        self.o: B = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

i = A("i")
l = B("l")
n = C("n")
m = D("m")
e = E("e")
b = F("b")
j = G("j")
a = H("a")
g = I("g")
h = B("h")

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