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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.x: H = None
        self.r: D = None
        self.o: D = None
        self.u: G = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.z: F = None
        self.p: A = None
        self.y: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.q: I = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: E = None
        self.r: F = None
        self.t: A = None
        self.p: E = None
        self.z: I = None
        self.s: F = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: G = None
        self.x: H = None
        self.r: D = None
        self.o: D = None
        self.u: G = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.z: F = None
        self.p: A = None
        self.y: H = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.q: I = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: E = None
        self.r: F = None
        self.t: A = None
        self.p: E = None
        self.z: I = None
        self.s: F = None
        self.q: G = None
        self.txt = txt

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

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

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