class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.u: D = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.s: H = None
        self.v: J = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.p: I = None
        self.w: H = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.w: C = None
        self.p: F = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: H = None
        self.r: B = None
        self.o: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.u: D = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.s: H = None
        self.v: J = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.p: I = None
        self.w: H = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: F = None
        self.w: C = None
        self.p: F = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: H = None
        self.r: B = None
        self.o: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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