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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: J = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: C = None
        self.y: I = None
        self.u: I = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: B = None
        self.v: I = None
        self.w: J = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: J = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: C = None
        self.y: I = None
        self.u: I = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: B = None
        self.v: I = None
        self.w: J = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: H = None
        self.txt = txt

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

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

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