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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.u: H = None
        self.s: A = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.r: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.y: B = None
        self.r: A = None
        self.t: G = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: F = None
        self.v: A = None
        self.s: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.u: H = None
        self.s: A = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.r: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.y: B = None
        self.r: A = None
        self.t: G = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: F = None
        self.v: A = None
        self.s: C = None
        self.txt = txt

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

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

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