class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.x: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.t: H = None
        self.u: G = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.t: H = None
        self.u: G = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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