class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.y: A = None
        self.q: H = None
        self.w: A = None
        self.u: F = None
        self.v: B = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.y: A = None
        self.q: H = None
        self.w: A = None
        self.u: F = None
        self.v: B = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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