class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.r: D = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: J = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: I = None
        self.t: D = None
        self.r: G = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.v: A = None
        self.p: G = None
        self.x: I = None
        self.s: B = None
        self.u: J = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.y: F = None
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: J = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: I = None
        self.t: D = None
        self.r: G = None
        self.o: D = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: I = None
        self.v: A = None
        self.p: G = None
        self.x: I = None
        self.s: B = None
        self.u: J = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: C = None
        self.y: F = None
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: I = None
        self.txt = txt

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

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