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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.q: J = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.q: D = None
        self.x: G = None
        self.y: E = None
        self.r: C = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: A = None
        self.u: C = None
        self.r: A = None
        self.t: D = None
        self.q: A = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.o: F = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

m = A("m")
l = B("l")
a = C("a")
c = D("c")
f = E("f")
g = F("g")
d = G("d")
j = H("j")
h = I("h")
i = J("i")

m.v = l
m.r = l
m.y = h
m.o = f
m.s = g
m.u = a
m.x = c
l.r = a
l.v = m
l.q = i
l.t = c
a.t = h
c.p = f
f.r = a
f.y = a
f.w = h
f.o = h
f.v = h
f.x = i
f.q = l
f.u = l
f.t = d
f.z = d
g.t = l
g.w = l
g.q = c
g.o = c
g.x = d
g.y = f
g.r = a
g.s = m
d.s = c
d.t = c
d.x = m
d.r = m
d.q = m
d.u = a
d.z = l
j.v = c
j.o = a
j.w = l
h.v = f
h.t = c
i.u = c
i.x = c
i.s = j
i.o = g
i.q = m
assert l.r.t.v.u.t.p.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.o: E = None
        self.s: F = None
        self.u: C = None
        self.r: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.q: J = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.q: D = None
        self.x: G = None
        self.y: E = None
        self.r: C = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: A = None
        self.u: C = None
        self.r: A = None
        self.t: D = None
        self.q: A = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: C = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: H = None
        self.o: F = None
        self.q: A = None
        self.x: D = None
        self.txt = txt

m = A("m")
l = B("l")
a = C("a")
c = D("c")
f = E("f")
g = F("g")
d = G("d")
j = H("j")
h = I("h")
i = J("i")

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