class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: G = None
        self.s: I = None
        self.x: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.u: J = None
        self.r: I = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: G = None
        self.s: I = None
        self.x: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.u: J = None
        self.r: I = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: E = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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