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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.z: C = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.s: D = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: A = None
        self.z: C = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.s: D = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

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

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