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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.q: F = None
        self.s: A = None
        self.u: F = None
        self.p: G = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: E = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

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

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

f = A("f")
a = B("a")
l = C("l")
k = D("k")
h = E("h")
n = F("n")
b = G("b")
e = H("e")
i = E("i")
d = D("d")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.q: F = None
        self.s: A = None
        self.u: F = None
        self.p: G = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: E = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

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

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

f = A("f")
a = B("a")
l = C("l")
k = D("k")
h = E("h")
n = F("n")
b = G("b")
e = H("e")
i = E("i")
d = D("d")

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