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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.s: C = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.s: C = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

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