class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: G = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.x: D = None
        self.v: C = None
        self.w: A = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: F = None
        self.r: E = None
        self.q: B = None
        self.x: F = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.v: C = None
        self.u: C = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.x: D = None
        self.v: C = None
        self.w: A = None
        self.t: A = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: F = None
        self.r: E = None
        self.q: B = None
        self.x: F = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.v: C = None
        self.u: C = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

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

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