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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.r: H = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.v: B = None
        self.o: F = None
        self.z: G = None
        self.x: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: A = None
        self.u: D = None
        self.x: E = None
        self.t: B = None
        self.o: E = None
        self.txt = txt

e = A("e")
i = B("i")
l = C("l")
k = D("k")
n = E("n")
g = F("g")
m = G("m")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.r: H = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.v: B = None
        self.o: F = None
        self.z: G = None
        self.x: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: A = None
        self.u: D = None
        self.x: E = None
        self.t: B = None
        self.o: E = None
        self.txt = txt

e = A("e")
i = B("i")
l = C("l")
k = D("k")
n = E("n")
g = F("g")
m = G("m")
f = H("f")

e.t = g
e.r = l
e.z = l
e.x = f
e.p = n
e.v = m
i.v = l
i.z = g
i.y = g
i.r = f
l.t = n
l.s = f
l.v = i
l.o = g
l.z = m
l.x = e
k.t = l
k.w = l
n.w = e
g.w = i
g.q = l
g.x = k
m.o = n
f.y = g
f.p = e
f.u = k
f.x = n
f.o = n
f.t = i
assert m.o.w.r.o.txt == "g"