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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: A = None
        self.w: E = None
        self.o: A = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.v: I = None
        self.y: I = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: J = None
        self.s: B = None
        self.t: D = None
        self.x: B = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: F = None
        self.q: E = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.t: D = None
        self.s: B = None
        self.p: I = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: A = None
        self.w: E = None
        self.o: A = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: G = None
        self.v: I = None
        self.y: I = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: J = None
        self.s: B = None
        self.t: D = None
        self.x: B = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: F = None
        self.q: E = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.t: D = None
        self.s: B = None
        self.p: I = None
        self.q: B = None
        self.txt = txt

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

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