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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: I = None
        self.z: A = None
        self.y: D = None
        self.t: F = None
        self.w: A = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: I = None
        self.z: A = None
        self.y: D = None
        self.t: F = None
        self.w: A = None
        self.v: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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