class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.t: H = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: B = None
        self.v: C = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.t: H = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: B = None
        self.v: C = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

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

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