class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.x: H = None
        self.p: B = None
        self.o: B = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: F = None
        self.p: E = None
        self.s: A = None
        self.v: E = None
        self.t: I = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: H = None
        self.u: B = None
        self.w: J = None
        self.q: H = None
        self.v: I = None
        self.z: A = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: F = None
        self.p: E = None
        self.s: A = None
        self.v: E = None
        self.t: I = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: H = None
        self.u: B = None
        self.w: J = None
        self.q: H = None
        self.v: I = None
        self.z: A = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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