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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: A = None
        self.txt = txt

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

b = A("b")
c = B("c")
g = C("g")
i = D("i")
e = E("e")
n = F("n")
a = G("a")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.u: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: A = None
        self.txt = txt

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

b = A("b")
c = B("c")
g = C("g")
i = D("i")
e = E("e")
n = F("n")
a = G("a")
j = H("j")

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