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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: A = None
        self.z: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.t: C = None
        self.txt = txt

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

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

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

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

i = A("i")
e = B("e")
h = C("h")
b = D("b")
d = E("d")
m = F("m")
c = G("c")
l = H("l")
f = A("f")

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: A = None
        self.z: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.t: C = None
        self.txt = txt

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

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

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

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

i = A("i")
e = B("e")
h = C("h")
b = D("b")
d = E("d")
m = F("m")
c = G("c")
l = H("l")
f = A("f")

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