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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: H = None
        self.w: B = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: C = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.u: F = None
        self.r: E = None
        self.z: G = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: H = None
        self.w: B = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: C = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.u: F = None
        self.r: E = None
        self.z: G = None
        self.p: E = None
        self.txt = txt

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

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