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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.y: I = None
        self.s: B = None
        self.z: G = None
        self.w: D = None
        self.v: F = None
        self.r: D = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: B = None
        self.z: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: A = None
        self.r: B = None
        self.v: A = None
        self.u: I = None
        self.x: B = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.y: I = None
        self.s: B = None
        self.z: G = None
        self.w: D = None
        self.v: F = None
        self.r: D = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: B = None
        self.z: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: A = None
        self.r: B = None
        self.v: A = None
        self.u: I = None
        self.x: B = None
        self.t: A = None
        self.txt = txt

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

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