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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: I = None
        self.o: A = None
        self.v: D = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.z: I = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.p: I = None
        self.v: I = None
        self.q: E = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: I = None
        self.o: A = None
        self.v: D = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: F = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.z: I = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.p: I = None
        self.v: I = None
        self.q: E = None
        self.y: I = None
        self.txt = txt

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

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