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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.r: A = None
        self.q: E = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.r: A = None
        self.q: E = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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