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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: I = None
        self.v: E = None
        self.r: F = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.t: D = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: H = None
        self.v: E = None
        self.u: F = None
        self.w: D = None
        self.r: G = None
        self.s: D = None
        self.p: C = None
        self.q: D = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: I = None
        self.v: E = None
        self.r: F = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: C = None
        self.t: D = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: H = None
        self.v: E = None
        self.u: F = None
        self.w: D = None
        self.r: G = None
        self.s: D = None
        self.p: C = None
        self.q: D = None
        self.t: H = None
        self.txt = txt

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

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