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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: G = None
        self.u: D = None
        self.o: G = None
        self.p: F = None
        self.z: F = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: B = None
        self.y: A = None
        self.p: J = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: G = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: G = None
        self.u: D = None
        self.o: G = None
        self.p: F = None
        self.z: F = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: B = None
        self.y: A = None
        self.p: J = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: G = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

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

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