class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.o: E = None
        self.t: H = None
        self.q: C = None
        self.w: D = None
        self.z: H = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: E = None
        self.y: F = None
        self.v: G = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.t: C = None
        self.v: C = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: E = None
        self.y: F = None
        self.v: G = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.t: C = None
        self.v: C = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

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

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