class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: J = None
        self.x: J = None
        self.s: C = None
        self.w: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: D = None
        self.o: J = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.r: J = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.p: G = None
        self.v: H = None
        self.x: F = None
        self.o: F = None
        self.t: H = None
        self.r: B = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: J = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: B = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

g.r = m
g.u = l
g.x = l
g.w = l
g.s = j
h.o = c
h.r = d
j.w = l
j.o = l
j.y = c
j.x = d
c.v = d
c.s = j
c.r = l
c.x = g
n.y = d
n.x = d
n.o = d
n.u = h
n.r = h
n.p = b
n.v = i
n.t = i
n.s = i
d.s = l
d.x = l
d.o = m
b.z = i
i.r = h
m.u = d
l.o = j
l.s = h
l.w = g
l.v = n
assert c.s.x.s.v.p.z.r.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: J = None
        self.x: J = None
        self.s: C = None
        self.w: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: D = None
        self.o: J = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.r: J = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.p: G = None
        self.v: H = None
        self.x: F = None
        self.o: F = None
        self.t: H = None
        self.r: B = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: J = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: B = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

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