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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.w: H = None
        self.t: A = None
        self.x: E = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: G = None
        self.u: B = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.o: H = None
        self.u: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.w: H = None
        self.t: A = None
        self.x: E = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: G = None
        self.u: B = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.o: H = None
        self.u: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.s: C = None
        self.txt = txt

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

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