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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.y: G = None
        self.q: C = None
        self.w: B = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.y: G = None
        self.q: C = None
        self.w: B = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

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

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