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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: H = None
        self.q: G = None
        self.v: G = None
        self.u: A = None
        self.w: F = None
        self.z: B = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.txt = txt

j = A("j")
k = B("k")
i = C("i")
n = D("n")
d = E("d")
e = F("e")
f = G("f")
a = H("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: H = None
        self.q: G = None
        self.v: G = None
        self.u: A = None
        self.w: F = None
        self.z: B = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.txt = txt

j = A("j")
k = B("k")
i = C("i")
n = D("n")
d = E("d")
e = F("e")
f = G("f")
a = H("a")

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