class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.q: E = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: D = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

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

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