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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: G = None
        self.o: C = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: G = None
        self.o: C = None
        self.p: D = None
        self.txt = txt

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

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