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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: E = None
        self.x: J = None
        self.q: G = None
        self.u: C = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: J = None
        self.t: E = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.v: H = None
        self.o: C = None
        self.r: H = None
        self.w: E = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.w: E = None
        self.p: I = None
        self.t: F = None
        self.z: H = None
        self.q: I = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: E = None
        self.x: J = None
        self.q: G = None
        self.u: C = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: J = None
        self.t: E = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.v: H = None
        self.o: C = None
        self.r: H = None
        self.w: E = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.w: E = None
        self.p: I = None
        self.t: F = None
        self.z: H = None
        self.q: I = None
        self.o: I = None
        self.txt = txt

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

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