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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.s: E = None
        self.o: G = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.txt = txt

n = A("n")
m = B("m")
d = C("d")
g = D("g")
j = E("j")
c = F("c")
l = G("l")
b = E("b")
h = F("h")
k = F("k")

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.s: E = None
        self.o: G = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.txt = txt

n = A("n")
m = B("m")
d = C("d")
g = D("g")
j = E("j")
c = F("c")
l = G("l")
b = E("b")
h = F("h")
k = F("k")

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