class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.p: G = None
        self.t: F = None
        self.o: E = None
        self.w: G = None
        self.v: I = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.q: A = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: J = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: E = None
        self.v: I = None
        self.p: A = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: I = None
        self.o: B = None
        self.u: J = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.u: I = None
        self.q: D = None
        self.y: F = None
        self.s: F = None
        self.o: E = None
        self.x: E = None
        self.txt = txt

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

j.r = l
j.p = l
j.w = l
j.z = h
j.t = f
j.o = b
j.v = n
j.u = a
d.v = h
d.u = h
d.q = j
d.t = n
d.o = a
g.u = n
g.v = d
g.w = a
h.p = b
h.w = g
h.x = g
h.q = j
h.z = j
h.v = a
h.u = d
h.o = d
h.t = n
h.s = n
b.z = g
b.x = k
b.w = k
f.x = b
f.y = b
f.v = n
f.z = n
f.p = j
l.s = d
l.y = f
l.z = f
l.u = a
l.r = a
l.v = a
l.w = j
l.q = j
l.o = j
l.x = k
a.w = n
a.x = n
a.o = d
a.r = d
a.u = k
n.p = j
k.w = a
k.v = a
k.u = n
k.q = h
k.y = f
k.s = f
k.o = b
k.x = b
assert b.z.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.p: G = None
        self.t: F = None
        self.o: E = None
        self.w: G = None
        self.v: I = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.q: A = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: J = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: E = None
        self.v: I = None
        self.p: A = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: I = None
        self.o: B = None
        self.u: J = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.u: I = None
        self.q: D = None
        self.y: F = None
        self.s: F = None
        self.o: E = None
        self.x: E = None
        self.txt = txt

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

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