class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.z: J = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.z: H = None
        self.t: B = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: E = None
        self.v: B = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: E = None
        self.x: D = None
        self.v: F = None
        self.y: B = None
        self.p: C = None
        self.t: C = None
        self.q: G = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

f = A("f")
c = B("c")
a = C("a")
j = D("j")
m = E("m")
l = F("l")
h = G("h")
g = H("g")
k = I("k")
i = J("i")

f.r = a
f.u = l
f.z = i
f.w = g
c.p = l
c.u = i
a.z = j
a.w = f
a.y = c
a.q = m
a.o = m
a.p = l
a.s = i
a.r = k
j.y = i
j.o = i
j.u = f
j.s = g
j.p = h
j.v = l
j.q = l
j.w = a
j.z = a
j.t = m
m.s = c
m.t = c
m.x = k
m.z = g
m.o = l
l.x = g
h.u = g
h.s = m
h.w = m
h.v = c
g.u = i
g.r = m
g.x = j
g.w = j
g.v = l
g.y = c
g.p = a
g.t = a
g.q = h
k.z = j
k.y = j
k.w = f
k.v = g
k.r = c
k.o = c
k.t = c
k.s = m
i.o = j
assert j.t.z.u.o.u.u.x.q.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.z: J = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.z: H = None
        self.t: B = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: E = None
        self.v: B = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: E = None
        self.x: D = None
        self.v: F = None
        self.y: B = None
        self.p: C = None
        self.t: C = None
        self.q: G = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

f = A("f")
c = B("c")
a = C("a")
j = D("j")
m = E("m")
l = F("l")
h = G("h")
g = H("g")
k = I("k")
i = J("i")

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