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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: J = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: J = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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