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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: H = None
        self.z: H = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: F = None
        self.v: A = None
        self.r: A = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: H = None
        self.z: H = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: F = None
        self.v: A = None
        self.r: A = None
        self.s: G = None
        self.o: C = None
        self.txt = txt

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

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

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