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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: J = None
        self.x: D = None
        self.t: J = None
        self.o: A = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.o: F = None
        self.w: I = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.u: G = None
        self.s: E = None
        self.v: F = None
        self.o: G = None
        self.p: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: J = None
        self.x: D = None
        self.t: J = None
        self.o: A = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.o: F = None
        self.w: I = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.u: G = None
        self.s: E = None
        self.v: F = None
        self.o: G = None
        self.p: J = None
        self.txt = txt

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

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

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