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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.y: H = None
        self.v: E = None
        self.q: B = None
        self.w: C = None
        self.s: E = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.o: B = None
        self.r: B = None
        self.q: B = None
        self.z: E = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.y: H = None
        self.v: E = None
        self.q: B = None
        self.w: C = None
        self.s: E = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.o: B = None
        self.r: B = None
        self.q: B = None
        self.z: E = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

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

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