class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: I = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.o: B = None
        self.x: G = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.p: C = None
        self.x: F = None
        self.y: A = None
        self.w: F = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: I = None
        self.v: D = None
        self.s: I = None
        self.o: H = None
        self.w: I = None
        self.p: B = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: C = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.p: A = None
        self.w: H = None
        self.t: F = None
        self.s: I = None
        self.u: A = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.o: B = None
        self.x: G = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: D = None
        self.p: C = None
        self.x: F = None
        self.y: A = None
        self.w: F = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: I = None
        self.v: D = None
        self.s: I = None
        self.o: H = None
        self.w: I = None
        self.p: B = None
        self.x: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: C = None
        self.s: C = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: F = None
        self.p: A = None
        self.w: H = None
        self.t: F = None
        self.s: I = None
        self.u: A = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

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