class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.y: C = None
        self.s: F = None
        self.v: B = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.y: C = None
        self.s: F = None
        self.v: B = None
        self.r: A = None
        self.txt = txt

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

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