class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.w: B = None
        self.p: F = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: E = None
        self.t: G = None
        self.y: A = None
        self.w: A = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.w: B = None
        self.p: F = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: E = None
        self.t: G = None
        self.y: A = None
        self.w: A = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

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