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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.o: B = None
        self.w: A = None
        self.p: C = None
        self.z: E = None
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: J = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: B = None
        self.o: F = None
        self.q: G = None
        self.r: I = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.p: C = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.o: B = None
        self.w: A = None
        self.p: C = None
        self.z: E = None
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: J = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: B = None
        self.o: F = None
        self.q: G = None
        self.r: I = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.p: C = None
        self.v: H = None
        self.txt = txt

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

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