class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.q: E = None
        self.o: D = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: H = None
        self.v: H = None
        self.u: I = None
        self.t: H = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.x: B = None
        self.w: A = None
        self.t: J = None
        self.u: D = None
        self.p: H = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.z: G = None
        self.o: G = None
        self.w: H = None
        self.x: H = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.s: B = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: H = None
        self.v: H = None
        self.u: I = None
        self.t: H = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.x: B = None
        self.w: A = None
        self.t: J = None
        self.u: D = None
        self.p: H = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.z: G = None
        self.o: G = None
        self.w: H = None
        self.x: H = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.s: B = None
        self.p: B = None
        self.txt = txt

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

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