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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.w: F = None
        self.z: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.w: F = None
        self.z: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: I = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

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

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