class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.x: F = None
        self.z: J = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: E = None
        self.q: H = None
        self.p: E = None
        self.w: D = None
        self.x: F = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: G = None
        self.u: I = None
        self.p: C = None
        self.v: F = None
        self.s: A = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.o: B = None
        self.r: J = None
        self.s: C = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: I = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: E = None
        self.q: H = None
        self.p: E = None
        self.w: D = None
        self.x: F = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: G = None
        self.u: I = None
        self.p: C = None
        self.v: F = None
        self.s: A = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: F = None
        self.o: B = None
        self.r: J = None
        self.s: C = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: I = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

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

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