class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: J = None
        self.u: B = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.p: F = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: E = None
        self.s: D = None
        self.t: H = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.p: F = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: E = None
        self.s: D = None
        self.t: H = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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