class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.x: I = None
        self.v: B = None
        self.u: I = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: B = None
        self.z: I = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.v: G = None
        self.w: A = None
        self.x: B = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: B = None
        self.z: I = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.v: G = None
        self.w: A = None
        self.x: B = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

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

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