class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: A = None
        self.y: G = None
        self.w: C = None
        self.x: B = None
        self.r: F = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: D = None
        self.u: G = None
        self.y: G = None
        self.r: A = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: F = None
        self.r: A = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

k = A("k")
j = B("j")
c = C("c")
b = D("b")
d = E("d")
f = F("f")
e = G("e")
i = H("i")
a = G("a")

k.o = b
k.x = d
j.s = b
j.u = k
c.w = j
c.r = i
c.q = i
c.x = i
c.z = i
c.v = a
c.u = b
c.p = d
b.v = j
b.q = d
d.o = i
d.s = k
d.y = a
d.w = c
d.x = j
d.t = j
d.r = f
d.q = f
f.q = i
f.w = b
f.u = e
f.y = a
f.r = k
f.p = c
e.y = i
e.t = f
e.z = f
e.r = k
e.o = b
i.r = j
i.o = j
i.u = d
i.x = d
i.q = e
i.y = e
a.y = i
a.t = f
a.z = f
a.r = k
a.o = b
assert b.q.s.o.q.y.y.u.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: A = None
        self.y: G = None
        self.w: C = None
        self.x: B = None
        self.r: F = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: D = None
        self.u: G = None
        self.y: G = None
        self.r: A = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: F = None
        self.r: A = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

k = A("k")
j = B("j")
c = C("c")
b = D("b")
d = E("d")
f = F("f")
e = G("e")
i = H("i")
a = G("a")

k.o = b
k.x = d
j.s = b
j.u = k
c.w = j
c.r = i
c.q = i
c.x = i
c.z = i
c.v = a
c.u = b
c.p = d
b.v = j
b.q = d
d.o = i
d.s = k
d.y = a
d.w = c
d.x = j
d.t = j
d.r = f
d.q = f
f.q = i
f.w = b
f.u = e
f.y = a
f.r = k
f.p = c
e.y = i
e.t = f
e.z = f
e.r = k
e.o = b
i.r = j
i.o = j
i.u = d
i.x = d
i.q = e
i.y = e
a.y = i
a.t = f
a.z = f
a.r = k
a.o = b
assert b.q.s.o.q.y.y.u.o.y.txt == "e"