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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.v: D = None
        self.y: H = None
        self.z: D = None
        self.w: B = None
        self.t: E = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.r: H = None
        self.u: A = None
        self.t: A = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.v: D = None
        self.y: H = None
        self.z: D = None
        self.w: B = None
        self.t: E = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.r: H = None
        self.u: A = None
        self.t: A = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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