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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: G = None
        self.t: H = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: H = None
        self.y: C = None
        self.q: B = None
        self.t: C = None
        self.w: B = None
        self.u: D = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.w: D = None
        self.y: J = None
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: G = None
        self.t: H = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: A = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: H = None
        self.y: C = None
        self.q: B = None
        self.t: C = None
        self.w: B = None
        self.u: D = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.w: D = None
        self.y: J = None
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.txt = txt

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

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

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