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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.z: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.z: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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