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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.p: C = None
        self.o: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.r: F = None
        self.v: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: B = None
        self.z: A = None
        self.q: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.p: C = None
        self.o: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.r: F = None
        self.v: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: B = None
        self.z: A = None
        self.q: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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