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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.u: F = None
        self.s: F = None
        self.w: B = None
        self.o: I = None
        self.x: A = None
        self.y: A = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.u: F = None
        self.s: F = None
        self.w: B = None
        self.o: I = None
        self.x: A = None
        self.y: A = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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