class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.q: D = None
        self.y: H = None
        self.x: C = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.q: H = None
        self.o: G = None
        self.w: D = None
        self.x: D = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: G = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.r: F = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: D = None
        self.v: H = None
        self.s: F = None
        self.q: F = None
        self.p: F = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.q: H = None
        self.o: G = None
        self.w: D = None
        self.x: D = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: G = None
        self.p: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.r: F = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: D = None
        self.v: H = None
        self.s: F = None
        self.q: F = None
        self.p: F = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.w: D = None
        self.txt = txt

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

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