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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: I = None
        self.s: E = None
        self.z: D = None
        self.q: G = None
        self.u: B = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.u: G = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.r: C = None
        self.x: H = None
        self.t: B = None
        self.p: C = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.r: D = None
        self.u: I = None
        self.txt = txt

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

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

n = A("n")
d = B("d")
a = C("a")
f = D("f")
j = E("j")
l = F("l")
g = G("g")
k = H("k")
m = I("m")
e = B("e")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: I = None
        self.s: E = None
        self.z: D = None
        self.q: G = None
        self.u: B = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.u: G = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.r: C = None
        self.x: H = None
        self.t: B = None
        self.p: C = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.r: D = None
        self.u: I = None
        self.txt = txt

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

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

n = A("n")
d = B("d")
a = C("a")
f = D("f")
j = E("j")
l = F("l")
g = G("g")
k = H("k")
m = I("m")
e = B("e")

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