class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

f.w = b
f.t = b
f.s = n
d.w = b
d.v = b
d.x = f
i.o = b
i.z = h
i.y = k
i.x = f
i.p = j
b.y = k
b.s = k
k.x = f
k.y = a
a.w = b
a.v = b
a.x = f
n.w = b
n.v = b
n.x = f
h.o = b
h.z = i
h.y = k
h.x = j
h.p = j
j.w = b
j.t = b
j.s = a
assert j.t.s.x.t.s.x.w.s.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

f.w = b
f.t = b
f.s = n
d.w = b
d.v = b
d.x = f
i.o = b
i.z = h
i.y = k
i.x = f
i.p = j
b.y = k
b.s = k
k.x = f
k.y = a
a.w = b
a.v = b
a.x = f
n.w = b
n.v = b
n.x = f
h.o = b
h.z = i
h.y = k
h.x = j
h.p = j
j.w = b
j.t = b
j.s = a
assert j.t.s.x.t.s.x.w.s.x.txt == "f"