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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.t: B = None
        self.q: B = None
        self.v: A = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.t: B = None
        self.q: B = None
        self.v: A = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

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

g.w = n
g.o = n
g.s = a
g.y = a
g.u = h
a.o = j
a.x = g
n.x = j
n.t = g
i.o = j
j.x = g
j.p = g
j.v = g
j.t = a
j.q = a
j.u = n
c.r = h
c.s = n
c.y = n
h.r = c
h.s = n
h.y = n
assert a.o.u.t.w.t.s.txt == "a"