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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.q: E = None
        self.p: B = None
        self.w: H = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.q: E = None
        self.p: B = None
        self.w: H = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.txt = txt

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

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

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