class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: F = None
        self.u: G = None
        self.o: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.q: D = None
        self.t: H = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: I = None
        self.r: F = None
        self.o: B = None
        self.y: B = None
        self.q: C = None
        self.p: G = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: F = None
        self.u: G = None
        self.o: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: C = None
        self.q: D = None
        self.t: H = None
        self.p: E = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: I = None
        self.r: F = None
        self.o: B = None
        self.y: B = None
        self.q: C = None
        self.p: G = None
        self.t: B = None
        self.txt = txt

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

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

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