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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: G = None
        self.p: H = None
        self.x: J = None
        self.v: F = None
        self.u: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: A = None
        self.v: D = None
        self.r: B = None
        self.w: F = None
        self.q: F = None
        self.s: H = None
        self.z: J = None
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: B = None
        self.x: C = None
        self.r: B = None
        self.v: D = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: G = None
        self.p: H = None
        self.x: J = None
        self.v: F = None
        self.u: D = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: A = None
        self.v: D = None
        self.r: B = None
        self.w: F = None
        self.q: F = None
        self.s: H = None
        self.z: J = None
        self.y: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: B = None
        self.x: C = None
        self.r: B = None
        self.v: D = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: C = None
        self.txt = txt

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

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