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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: J = None
        self.z: J = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.v: I = None
        self.r: G = None
        self.p: B = None
        self.y: C = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: G = None
        self.y: H = None
        self.x: F = None
        self.z: B = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: J = None
        self.z: J = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.v: I = None
        self.r: G = None
        self.p: B = None
        self.y: C = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: G = None
        self.y: H = None
        self.x: F = None
        self.z: B = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.txt = txt

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

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