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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.w: E = None
        self.q: A = None
        self.u: A = None
        self.t: E = None
        self.x: C = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: J = None
        self.z: I = None
        self.w: I = None
        self.y: J = None
        self.u: C = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.u: B = None
        self.x: F = None
        self.v: B = None
        self.p: B = None
        self.z: H = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: H = None
        self.r: E = None
        self.w: C = None
        self.t: H = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.w: E = None
        self.q: A = None
        self.u: A = None
        self.t: E = None
        self.x: C = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.p: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: J = None
        self.z: I = None
        self.w: I = None
        self.y: J = None
        self.u: C = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.u: B = None
        self.x: F = None
        self.v: B = None
        self.p: B = None
        self.z: H = None
        self.y: D = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: H = None
        self.r: E = None
        self.w: C = None
        self.t: H = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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