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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.t: A = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.s: E = None
        self.x: B = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: I = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

l = A("l")
j = B("j")
f = C("f")
k = D("k")
e = E("e")
h = F("h")
m = G("m")
n = H("n")
c = I("c")
d = J("d")

l.s = n
l.t = n
l.y = n
l.q = e
l.o = m
l.x = k
l.p = f
l.r = f
l.w = d
j.o = h
j.v = k
j.t = l
j.w = l
f.t = j
f.o = j
f.z = d
f.x = d
f.q = d
f.u = c
f.v = e
f.s = l
f.r = n
k.q = n
k.o = h
e.x = d
e.z = j
h.u = j
m.t = c
m.u = c
m.z = d
m.r = k
m.q = n
m.w = n
m.v = l
n.o = h
n.v = h
n.x = e
n.t = l
n.z = m
n.u = k
n.p = k
n.r = f
n.q = c
c.w = l
c.v = j
c.x = j
c.s = e
c.o = m
d.s = h
d.v = c
d.o = f
d.u = e
assert l.s.z.r.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.q: E = None
        self.o: G = None
        self.x: D = None
        self.p: C = None
        self.y: H = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.t: A = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.s: E = None
        self.x: B = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: I = None
        self.o: C = None
        self.u: E = None
        self.txt = txt

l = A("l")
j = B("j")
f = C("f")
k = D("k")
e = E("e")
h = F("h")
m = G("m")
n = H("n")
c = I("c")
d = J("d")

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