class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.t: E = None
        self.p: E = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.t: E = None
        self.p: E = None
        self.x: F = None
        self.y: D = None
        self.txt = txt

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

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