class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: E = None
        self.s: C = None
        self.v: J = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.o: E = None
        self.w: I = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: H = None
        self.p: F = None
        self.q: D = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: E = None
        self.s: C = None
        self.v: J = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.o: E = None
        self.w: I = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: H = None
        self.p: F = None
        self.q: D = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: G = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

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

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