class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.x: J = None
        self.p: F = None
        self.z: J = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: D = None
        self.v: F = None
        self.t: D = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.z: H = None
        self.u: J = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.x: J = None
        self.p: F = None
        self.z: J = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: D = None
        self.v: F = None
        self.t: D = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.z: H = None
        self.u: J = None
        self.o: A = None
        self.txt = txt

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

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

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