class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: B = None
        self.u: C = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.v: D = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.r: A = None
        self.v: G = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.txt = txt

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

i = A("i")
a = B("a")
b = C("b")
l = D("l")
n = E("n")
c = F("c")
e = G("e")
g = H("g")

i.o = e
i.q = a
i.u = b
i.z = l
i.t = n
a.r = i
a.z = n
a.v = l
a.x = g
b.r = g
b.u = g
b.x = e
b.y = l
l.u = c
l.q = c
l.r = i
l.v = e
l.z = e
l.w = n
n.z = g
n.t = g
n.w = l
c.z = l
c.r = g
e.q = a
e.s = b
g.y = b
assert l.w.w.u.r.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: B = None
        self.u: C = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.v: D = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.r: A = None
        self.v: G = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.txt = txt

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

i = A("i")
a = B("a")
b = C("b")
l = D("l")
n = E("n")
c = F("c")
e = G("e")
g = H("g")

i.o = e
i.q = a
i.u = b
i.z = l
i.t = n
a.r = i
a.z = n
a.v = l
a.x = g
b.r = g
b.u = g
b.x = e
b.y = l
l.u = c
l.q = c
l.r = i
l.v = e
l.z = e
l.w = n
n.z = g
n.t = g
n.w = l
c.z = l
c.r = g
e.q = a
e.s = b
g.y = b
assert l.w.w.u.r.y.x.txt == "e"