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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.y: D = None
        self.t: H = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: G = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: H = None
        self.s: C = None
        self.q: D = None
        self.w: B = None
        self.x: B = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.p: D = None
        self.r: C = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.y: D = None
        self.t: H = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: G = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: H = None
        self.s: C = None
        self.q: D = None
        self.w: B = None
        self.x: B = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.p: D = None
        self.r: C = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

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

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