class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.t: C = None
        self.o: C = None
        self.r: E = None
        self.y: C = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.t: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: H = None
        self.t: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

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

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