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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.q: D = None
        self.r: J = None
        self.w: A = None
        self.u: A = None
        self.p: C = None
        self.t: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: I = None
        self.q: F = None
        self.o: B = None
        self.s: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.u: J = None
        self.p: E = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: J = None
        self.q: C = None
        self.z: I = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.s: A = None
        self.q: A = None
        self.p: F = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: D = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.q: D = None
        self.r: J = None
        self.w: A = None
        self.u: A = None
        self.p: C = None
        self.t: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: J = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: I = None
        self.q: F = None
        self.o: B = None
        self.s: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.u: J = None
        self.p: E = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: J = None
        self.q: C = None
        self.z: I = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: H = None
        self.s: A = None
        self.q: A = None
        self.p: F = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: D = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

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

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