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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.v: F = None
        self.p: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

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

i.w = d
i.q = h
i.s = a
j.o = i
j.q = a
j.v = h
j.p = g
d.q = h
f.o = h
f.w = g
f.u = g
f.y = g
f.p = i
e.s = g
e.y = g
e.u = a
h.o = f
h.p = g
h.u = d
h.w = c
g.o = i
g.q = a
g.v = h
g.p = j
a.q = h
c.o = h
c.w = g
c.y = g
c.u = j
c.p = i
assert d.q.u.q.o.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.v: F = None
        self.p: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.u: C = None
        self.w: D = None
        self.txt = txt

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

i.w = d
i.q = h
i.s = a
j.o = i
j.q = a
j.v = h
j.p = g
d.q = h
f.o = h
f.w = g
f.u = g
f.y = g
f.p = i
e.s = g
e.y = g
e.u = a
h.o = f
h.p = g
h.u = d
h.w = c
g.o = i
g.q = a
g.v = h
g.p = j
a.q = h
c.o = h
c.w = g
c.y = g
c.u = j
c.p = i
assert d.q.u.q.o.p.s.txt == "a"