class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: H = None
        self.q: H = None
        self.w: G = None
        self.t: G = None
        self.u: H = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: J = None
        self.p: D = None
        self.w: J = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: A = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: B = None
        self.s: E = None
        self.v: C = None
        self.p: A = None
        self.y: F = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: J = None
        self.p: D = None
        self.w: J = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: A = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: B = None
        self.s: E = None
        self.v: C = None
        self.p: A = None
        self.y: F = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: G = None
        self.txt = txt

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

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

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