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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: J = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.q: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: J = None
        self.p: F = None
        self.x: I = None
        self.u: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.r: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: J = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.q: C = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: J = None
        self.p: F = None
        self.x: I = None
        self.u: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: F = None
        self.txt = txt

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

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

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