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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

j = A("j")
h = B("h")
k = C("k")
i = D("i")
b = E("b")
a = F("a")
f = E("f")
g = C("g")

j.u = f
j.x = b
j.s = a
h.u = f
h.q = f
h.o = f
h.x = i
k.q = h
k.w = h
k.z = i
k.t = i
i.y = j
i.w = j
i.x = g
i.q = f
b.z = h
b.t = h
b.u = g
b.s = k
b.w = i
a.x = h
f.z = h
f.t = h
f.u = k
f.s = k
f.w = i
g.q = h
g.w = h
g.z = i
g.t = i
assert h.o.w.x.w.u.w.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

j = A("j")
h = B("h")
k = C("k")
i = D("i")
b = E("b")
a = F("a")
f = E("f")
g = C("g")

j.u = f
j.x = b
j.s = a
h.u = f
h.q = f
h.o = f
h.x = i
k.q = h
k.w = h
k.z = i
k.t = i
i.y = j
i.w = j
i.x = g
i.q = f
b.z = h
b.t = h
b.u = g
b.s = k
b.w = i
a.x = h
f.z = h
f.t = h
f.u = k
f.s = k
f.w = i
g.q = h
g.w = h
g.z = i
g.t = i
assert h.o.w.x.w.u.w.q.txt == "f"