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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.r: B = None
        self.o: H = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: J = None
        self.p: C = None
        self.w: H = None
        self.z: J = None
        self.y: B = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: D = None
        self.w: E = None
        self.z: C = None
        self.y: A = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.t: A = None
        self.o: B = None
        self.y: H = None
        self.p: F = None
        self.v: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.r: B = None
        self.o: H = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: J = None
        self.p: C = None
        self.w: H = None
        self.z: J = None
        self.y: B = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: D = None
        self.w: E = None
        self.z: C = None
        self.y: A = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.t: A = None
        self.o: B = None
        self.y: H = None
        self.p: F = None
        self.v: I = None
        self.txt = txt

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

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