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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: J = None
        self.p: J = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.q: H = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: J = None
        self.p: J = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.q: H = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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