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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

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

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