class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.o: I = None
        self.p: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.y: B = None
        self.w: J = None
        self.r: I = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: I = None
        self.z: F = None
        self.x: A = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: E = None
        self.p: D = None
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.y: B = None
        self.w: J = None
        self.r: I = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: I = None
        self.z: F = None
        self.x: A = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: B = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: E = None
        self.p: D = None
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

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