class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: E = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: G = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.t: G = None
        self.z: D = None
        self.y: C = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: E = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: G = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.t: G = None
        self.z: D = None
        self.y: C = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

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