class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.z: F = None
        self.w: E = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: F = None
        self.s: B = None
        self.t: H = None
        self.w: H = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: B = None
        self.y: H = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: F = None
        self.s: B = None
        self.t: H = None
        self.w: H = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: B = None
        self.y: H = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.txt = txt

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

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

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