class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

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

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

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

j = A("j")
h = B("h")
k = C("k")
c = D("c")
e = A("e")
f = C("f")
n = D("n")
d = B("d")

j.p = e
j.q = k
j.v = f
j.y = h
h.z = f
k.o = d
k.t = h
k.w = h
k.r = f
c.u = k
c.w = h
c.s = h
e.p = j
e.q = f
e.v = f
e.y = d
f.o = d
f.t = d
f.r = k
f.w = h
n.u = f
n.w = d
n.s = h
d.z = k
assert j.y.z.w.z.t.z.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

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

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

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

j = A("j")
h = B("h")
k = C("k")
c = D("c")
e = A("e")
f = C("f")
n = D("n")
d = B("d")

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