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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.x: E = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.r: E = None
        self.v: C = None
        self.w: F = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.x: E = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.r: E = None
        self.v: C = None
        self.w: F = None
        self.o: C = None
        self.txt = txt

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

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