class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: F = None
        self.q: G = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.r: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.q: G = None
        self.z: A = None
        self.o: A = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.r: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.q: G = None
        self.z: A = None
        self.o: A = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

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

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