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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: I = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: A = None
        self.r: G = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

g = A("g")
b = B("b")
n = C("n")
h = D("h")
m = E("m")
c = F("c")
l = G("l")
a = H("a")
i = I("i")
d = J("d")

g.u = n
g.s = m
g.r = m
g.o = m
g.w = c
g.q = d
b.x = l
b.s = g
b.q = a
b.y = h
b.z = m
b.p = c
n.o = m
n.v = i
n.p = d
h.q = d
h.v = g
h.x = g
h.r = l
h.y = l
m.t = l
m.y = a
m.z = b
m.v = b
m.r = b
m.s = i
m.p = c
c.t = g
c.v = h
l.z = g
l.v = d
l.r = b
l.s = b
l.t = m
l.p = m
l.x = m
l.y = h
l.q = n
a.z = m
a.u = m
a.y = d
a.w = d
a.t = d
a.p = b
a.r = c
a.q = i
a.v = i
a.x = h
i.q = c
d.p = i
d.z = l
d.q = g
d.t = b
d.w = a
d.u = a
assert l.q.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: E = None
        self.w: F = None
        self.r: E = None
        self.o: E = None
        self.q: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: I = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: A = None
        self.r: G = None
        self.x: A = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

g = A("g")
b = B("b")
n = C("n")
h = D("h")
m = E("m")
c = F("c")
l = G("l")
a = H("a")
i = I("i")
d = J("d")

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