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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: D = None
        self.x: C = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: D = None
        self.o: B = None
        self.v: D = None
        self.w: G = None
        self.q: J = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.x: A = None
        self.z: G = None
        self.s: E = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: D = None
        self.x: C = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: D = None
        self.o: B = None
        self.v: D = None
        self.w: G = None
        self.q: J = None
        self.s: B = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.x: A = None
        self.z: G = None
        self.s: E = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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