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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.q: D = None
        self.r: G = None
        self.u: D = None
        self.w: F = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.q: D = None
        self.r: G = None
        self.u: D = None
        self.w: F = None
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

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