class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: F = None
        self.z: J = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.u: A = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: F = None
        self.s: I = None
        self.x: G = None
        self.v: D = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.r: G = None
        self.s: F = None
        self.t: H = None
        self.p: G = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: A = None
        self.u: A = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: F = None
        self.s: I = None
        self.x: G = None
        self.v: D = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.r: G = None
        self.s: F = None
        self.t: H = None
        self.p: G = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

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

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

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