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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: E = None
        self.s: J = None
        self.v: F = None
        self.t: E = None
        self.o: H = None
        self.u: E = None
        self.w: J = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: I = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: F = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.o: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: E = None
        self.s: J = None
        self.v: F = None
        self.t: E = None
        self.o: H = None
        self.u: E = None
        self.w: J = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: I = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: F = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.o: J = None
        self.txt = txt

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

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

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