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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: G = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: E = None
        self.z: B = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: D = None
        self.o: I = None
        self.z: C = None
        self.v: G = None
        self.y: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: G = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: E = None
        self.z: B = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: D = None
        self.o: I = None
        self.z: C = None
        self.v: G = None
        self.y: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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