class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: I = None
        self.w: H = None
        self.y: B = None
        self.u: H = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: H = None
        self.v: D = None
        self.q: F = None
        self.y: B = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

f = A("f")
m = B("m")
j = C("j")
l = D("l")
n = E("n")
e = F("e")
g = G("g")
a = H("a")
c = I("c")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: H = None
        self.v: D = None
        self.q: F = None
        self.y: B = None
        self.p: E = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

f = A("f")
m = B("m")
j = C("j")
l = D("l")
n = E("n")
e = F("e")
g = G("g")
a = H("a")
c = I("c")

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