class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.t: G = None
        self.w: F = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.r: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: H = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.z: G = None
        self.x: G = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.r: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: H = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.z: G = None
        self.x: G = None
        self.s: D = None
        self.t: A = None
        self.txt = txt

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

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