class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: B = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.z: E = None
        self.u: A = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: F = None
        self.z: J = None
        self.u: G = None
        self.w: D = None
        self.q: G = None
        self.o: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.y: H = None
        self.o: I = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: C = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.r: F = None
        self.t: E = None
        self.w: E = None
        self.s: I = None
        self.q: I = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.z: E = None
        self.u: A = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: F = None
        self.z: J = None
        self.u: G = None
        self.w: D = None
        self.q: G = None
        self.o: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: C = None
        self.y: H = None
        self.o: I = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: C = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.r: F = None
        self.t: E = None
        self.w: E = None
        self.s: I = None
        self.q: I = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

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

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

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