class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: A = None
        self.s: I = None
        self.w: E = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: G = None
        self.q: G = None
        self.o: H = None
        self.w: E = None
        self.u: D = None
        self.txt = txt

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

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

n.p = g
n.y = d
n.x = h
d.r = c
d.p = c
d.t = n
d.o = e
d.v = e
d.y = j
d.z = h
g.z = k
g.t = b
g.p = h
g.u = d
l.q = k
l.v = k
l.o = n
l.s = j
l.w = e
e.u = k
e.x = j
b.q = n
b.p = n
b.o = l
b.r = j
b.x = e
b.t = c
b.w = h
h.x = n
h.y = n
h.r = d
h.z = d
h.u = k
h.s = b
h.q = b
h.w = c
h.t = e
c.u = j
c.o = e
c.v = e
c.p = d
c.r = k
c.z = k
c.s = l
j.v = d
j.p = h
j.q = h
j.o = c
j.w = e
j.u = l
k.z = g
k.r = g
k.s = b
k.w = n
k.u = j
k.q = e
assert c.r.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: A = None
        self.s: I = None
        self.w: E = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: G = None
        self.q: G = None
        self.o: H = None
        self.w: E = None
        self.u: D = None
        self.txt = txt

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

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

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