class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.t: J = None
        self.x: J = None
        self.z: J = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: C = None
        self.t: A = None
        self.x: J = None
        self.s: J = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.r: J = None
        self.o: C = None
        self.v: I = None
        self.p: F = None
        self.x: C = None
        self.u: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: G = None
        self.v: D = None
        self.x: D = None
        self.z: E = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: C = None
        self.t: A = None
        self.x: J = None
        self.s: J = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.r: J = None
        self.o: C = None
        self.v: I = None
        self.p: F = None
        self.x: C = None
        self.u: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: G = None
        self.v: D = None
        self.x: D = None
        self.z: E = None
        self.w: F = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

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

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