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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: B = None
        self.w: F = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.x: G = None
        self.u: I = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.y: A = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: B = None
        self.w: F = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: F = None
        self.x: G = None
        self.u: I = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: G = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.y: A = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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