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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.r: E = None
        self.x: E = None
        self.o: E = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: B = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.s: D = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.r: E = None
        self.x: E = None
        self.o: E = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: B = None
        self.y: G = None
        self.txt = txt

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

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