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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: H = None
        self.z: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.v: E = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: H = None
        self.z: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.v: E = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

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

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