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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.s: G = None
        self.p: H = None
        self.o: D = None
        self.v: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.s: G = None
        self.p: H = None
        self.o: D = None
        self.v: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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