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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: E = None
        self.p: F = None
        self.w: A = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.r: H = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.o: B = None
        self.x: F = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: E = None
        self.p: F = None
        self.w: A = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.r: H = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: D = None
        self.o: B = None
        self.x: F = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

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

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