class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.v: I = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: I = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: A = None
        self.o: A = None
        self.w: C = None
        self.z: B = None
        self.t: A = None
        self.s: D = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: I = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: A = None
        self.o: A = None
        self.w: C = None
        self.z: B = None
        self.t: A = None
        self.s: D = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.txt = txt

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

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

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