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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: A = None
        self.y: C = None
        self.x: A = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

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

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

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

h = A("h")
m = B("m")
f = C("f")
j = D("j")
b = E("b")
i = F("i")
a = G("a")
l = H("l")
k = H("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: A = None
        self.y: C = None
        self.x: A = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

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

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

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

h = A("h")
m = B("m")
f = C("f")
j = D("j")
b = E("b")
i = F("i")
a = G("a")
l = H("l")
k = H("k")

h.v = m
m.v = b
f.w = h
j.u = i
j.q = i
j.x = i
j.z = m
b.o = a
b.z = h
b.x = h
b.y = f
b.q = f
b.v = i
i.y = k
i.r = j
i.u = h
a.v = m
a.p = m
a.z = m
a.y = h
a.x = j
a.u = l
a.q = b
l.r = b
l.w = k
l.u = k
l.o = f
l.p = f
l.s = f
l.t = m
l.q = h
k.r = b
k.w = l
k.u = l
k.o = f
k.p = f
k.s = f
k.t = m
k.q = h
assert a.x.z.v.v.y.r.v.r.x.txt == "i"