class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: F = None
        self.r: I = None
        self.s: F = None
        self.x: J = None
        self.y: D = None
        self.w: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: H = None
        self.x: B = None
        self.p: E = None
        self.t: I = None
        self.q: H = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.u: H = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: I = None
        self.x: F = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.v: E = None
        self.r: I = None
        self.w: E = None
        self.o: H = None
        self.z: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: H = None
        self.x: B = None
        self.p: E = None
        self.t: I = None
        self.q: H = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.u: H = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: I = None
        self.x: F = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.v: E = None
        self.r: I = None
        self.w: E = None
        self.o: H = None
        self.z: I = None
        self.txt = txt

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

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