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

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

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

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

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

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

j = A("j")
g = B("g")
k = C("k")
i = D("i")
a = E("a")
l = F("l")
c = A("c")

j.u = i
j.w = i
j.q = g
j.r = a
j.s = a
j.y = c
g.y = k
k.w = c
k.s = j
i.p = c
i.s = a
i.v = a
i.q = l
i.o = k
a.q = g
a.r = k
l.r = i
l.q = i
l.v = a
l.s = j
c.u = i
c.w = i
c.q = g
c.r = a
c.s = a
c.y = j
assert g.y.w.y.q.y.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.q: B = None
        self.r: E = None
        self.s: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

j = A("j")
g = B("g")
k = C("k")
i = D("i")
a = E("a")
l = F("l")
c = A("c")

j.u = i
j.w = i
j.q = g
j.r = a
j.s = a
j.y = c
g.y = k
k.w = c
k.s = j
i.p = c
i.s = a
i.v = a
i.q = l
i.o = k
a.q = g
a.r = k
l.r = i
l.q = i
l.v = a
l.s = j
c.u = i
c.w = i
c.q = g
c.r = a
c.s = a
c.y = j
assert g.y.w.y.q.y.w.s.txt == "a"