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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: G = None
        self.t: D = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: F = None
        self.x: B = None
        self.s: C = None
        self.o: B = None
        self.q: A = None
        self.v: H = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: G = None
        self.t: D = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.v: F = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: F = None
        self.x: B = None
        self.s: C = None
        self.o: B = None
        self.q: A = None
        self.v: H = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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