class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: B = None
        self.y: F = None
        self.t: E = None
        self.u: C = None
        self.s: F = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.s: A = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: B = None
        self.x: E = None
        self.v: F = None
        self.w: J = None
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: J = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: F = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.o: B = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.s: A = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: B = None
        self.x: E = None
        self.v: F = None
        self.w: J = None
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: J = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: F = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.o: B = None
        self.y: G = None
        self.txt = txt

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

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