class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: B = None
        self.x: G = None
        self.p: E = None
        self.r: B = None
        self.s: H = None
        self.v: G = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: C = None
        self.r: A = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: A = None
        self.p: B = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

a = A("a")
b = B("b")
f = C("f")
l = D("l")
h = E("h")
m = F("m")
e = G("e")
k = H("k")
i = I("i")
n = C("n")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: C = None
        self.r: A = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: A = None
        self.p: B = None
        self.t: I = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: F = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

a = A("a")
b = B("b")
f = C("f")
l = D("l")
h = E("h")
m = F("m")
e = G("e")
k = H("k")
i = I("i")
n = C("n")

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