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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: H = None
        self.q: E = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: H = None
        self.q: E = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

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

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