class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.x: D = None
        self.t: E = None
        self.z: C = None
        self.w: D = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.z: H = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.o: E = None
        self.q: B = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.y: G = None
        self.o: F = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.x: D = None
        self.t: E = None
        self.z: C = None
        self.w: D = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.z: H = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.o: E = None
        self.q: B = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.y: G = None
        self.o: F = None
        self.s: F = None
        self.txt = txt

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

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