class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.o: I = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: I = None
        self.x: J = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: G = None
        self.t: D = None
        self.x: G = None
        self.q: I = None
        self.o: J = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: E = None
        self.p: F = None
        self.v: J = None
        self.txt = txt

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

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

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

k = A("k")
l = B("l")
a = C("a")
g = D("g")
f = E("f")
h = F("h")
b = G("b")
j = H("j")
d = I("d")
c = J("c")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: I = None
        self.x: J = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: G = None
        self.t: D = None
        self.x: G = None
        self.q: I = None
        self.o: J = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: E = None
        self.p: F = None
        self.v: J = None
        self.txt = txt

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

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

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

k = A("k")
l = B("l")
a = C("a")
g = D("g")
f = E("f")
h = F("h")
b = G("b")
j = H("j")
d = I("d")
c = J("c")

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