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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.t: A = None
        self.s: D = None
        self.w: H = None
        self.r: A = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.t: A = None
        self.s: D = None
        self.w: H = None
        self.r: A = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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