class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: E = None
        self.r: I = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.y: E = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.v: H = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: A = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: A = None
        self.y: E = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.v: H = None
        self.p: B = None
        self.txt = txt

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

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