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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: C = None
        self.v: I = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.s: E = None
        self.p: E = None
        self.o: J = None
        self.t: C = None
        self.q: J = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: C = None
        self.v: I = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: C = None
        self.s: E = None
        self.p: E = None
        self.o: J = None
        self.t: C = None
        self.q: J = None
        self.txt = txt

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

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

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