class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.p: A = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.t: A = None
        self.y: G = None
        self.s: H = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: A = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.q: G = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.p: A = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.t: A = None
        self.y: G = None
        self.s: H = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: A = None
        self.y: F = None
        self.txt = txt

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

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

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