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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.q: B = None
        self.v: D = None
        self.s: D = None
        self.u: I = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.q: B = None
        self.r: H = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.p: E = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: F = None
        self.y: B = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.q: B = None
        self.v: D = None
        self.s: D = None
        self.u: I = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.q: B = None
        self.r: H = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.p: E = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: F = None
        self.y: B = None
        self.p: B = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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