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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: J = None
        self.u: A = None
        self.x: H = None
        self.o: D = None
        self.r: C = None
        self.v: D = None
        self.q: F = None
        self.y: D = None
        self.p: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.r: F = None
        self.z: D = None
        self.q: E = None
        self.y: J = None
        self.u: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: J = None
        self.u: A = None
        self.x: H = None
        self.o: D = None
        self.r: C = None
        self.v: D = None
        self.q: F = None
        self.y: D = None
        self.p: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.r: F = None
        self.z: D = None
        self.q: E = None
        self.y: J = None
        self.u: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: E = None
        self.w: H = None
        self.txt = txt

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

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