class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.t: F = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.txt = txt

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

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

e.p = c
e.r = m
e.x = g
c.o = e
c.z = j
c.y = k
c.u = a
c.p = m
c.v = m
c.w = g
c.t = g
m.p = a
m.t = a
m.o = e
m.v = c
m.q = c
g.s = m
k.x = j
k.s = j
k.w = j
k.o = g
k.z = m
k.u = m
a.t = m
a.q = j
l.v = m
l.q = k
j.s = a
j.x = a
j.q = c
j.r = l
j.p = l
assert l.q.o.s.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.t: F = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.txt = txt

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

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

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