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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.y: C = None
        self.o: E = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

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

j.q = c
j.x = f
i.p = j
i.t = f
i.o = f
i.y = g
i.v = h
g.p = i
g.o = c
g.u = b
g.r = n
g.w = h
h.u = i
h.t = i
h.z = c
h.p = c
f.u = h
f.s = g
n.s = f
n.v = b
c.q = l
c.x = f
b.p = i
b.o = c
b.u = g
b.r = n
b.w = h
l.q = j
l.x = f
assert c.x.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.y: C = None
        self.o: E = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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