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

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

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

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

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

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

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

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

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

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

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

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

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

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

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