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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.x: C = None
        self.r: D = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.z: I = None
        self.r: I = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: F = None
        self.t: E = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.x: F = None
        self.v: I = None
        self.p: F = None
        self.s: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.x: C = None
        self.r: D = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: H = None
        self.z: I = None
        self.r: I = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: F = None
        self.t: E = None
        self.s: H = None
        self.q: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.x: F = None
        self.v: I = None
        self.p: F = None
        self.s: I = None
        self.txt = txt

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

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

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