class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.s: B = None
        self.q: E = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: A = None
        self.x: B = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.s: B = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: A = None
        self.x: B = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.s: B = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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