class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.r: G = None
        self.s: B = None
        self.o: B = None
        self.z: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.u: D = None
        self.p: F = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.r: G = None
        self.s: B = None
        self.o: B = None
        self.z: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.u: D = None
        self.p: F = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

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

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