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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: C = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.s: B = None
        self.q: C = None
        self.r: A = None
        self.v: C = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.o: C = None
        self.v: B = None
        self.s: J = None
        self.q: H = None
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: J = None
        self.s: H = None
        self.u: J = None
        self.t: J = None
        self.x: B = None
        self.r: G = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: C = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.s: B = None
        self.q: C = None
        self.r: A = None
        self.v: C = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.o: C = None
        self.v: B = None
        self.s: J = None
        self.q: H = None
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: J = None
        self.s: H = None
        self.u: J = None
        self.t: J = None
        self.x: B = None
        self.r: G = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

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

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

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