class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.p: B = None
        self.o: I = None
        self.q: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.v: B = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: J = None
        self.q: E = None
        self.r: E = None
        self.t: A = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.v: B = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: J = None
        self.q: E = None
        self.r: E = None
        self.t: A = None
        self.w: J = None
        self.txt = txt

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

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

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

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