class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: I = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.r: A = None
        self.y: G = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.v: C = None
        self.t: F = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: I = None
        self.w: B = None
        self.o: A = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.v: E = None
        self.s: E = None
        self.x: I = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.r: A = None
        self.y: G = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.v: C = None
        self.t: F = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: I = None
        self.w: B = None
        self.o: A = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.v: E = None
        self.s: E = None
        self.x: I = None
        self.t: C = None
        self.txt = txt

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

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