class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: E = None
        self.s: C = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

c = A("c")
e = B("e")
i = C("i")
d = D("d")
b = E("b")
g = F("g")
h = B("h")
l = E("l")
m = A("m")
n = E("n")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

c = A("c")
e = B("e")
i = C("i")
d = D("d")
b = E("b")
g = F("g")
h = B("h")
l = E("l")
m = A("m")
n = E("n")

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