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

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

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: F = None
        self.x: F = None
        self.v: A = None
        self.y: G = None
        self.p: E = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: C = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: F = None
        self.x: F = None
        self.v: A = None
        self.y: G = None
        self.p: E = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: C = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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