class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: J = None
        self.s: E = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.t: A = None
        self.z: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: A = None
        self.z: D = None
        self.t: D = None
        self.r: E = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: I = None
        self.v: G = None
        self.t: A = None
        self.y: E = None
        self.p: E = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.t: A = None
        self.z: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: A = None
        self.z: D = None
        self.t: D = None
        self.r: E = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: I = None
        self.v: G = None
        self.t: A = None
        self.y: E = None
        self.p: E = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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