class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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