class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.u: D = None
        self.s: G = None
        self.p: J = None
        self.x: C = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: G = None
        self.t: I = None
        self.u: A = None
        self.z: I = None
        self.o: C = None
        self.txt = txt

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

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

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

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

g = A("g")
b = B("b")
m = C("m")
h = D("h")
i = E("i")
l = F("l")
a = G("a")
e = H("e")
f = I("f")
d = J("d")

g.s = a
g.y = f
g.t = f
g.w = f
b.y = l
b.z = m
b.x = m
b.u = h
b.s = a
b.p = d
b.t = f
m.w = a
m.x = h
h.p = f
i.r = m
l.s = b
l.x = a
l.t = f
l.z = f
l.u = g
l.o = m
a.t = l
a.x = l
a.o = l
a.y = l
a.v = f
a.z = e
a.p = i
a.s = b
a.r = b
e.q = l
f.p = d
f.v = i
f.s = i
f.w = b
f.o = g
d.o = f
d.w = f
assert g.w.w.y.u.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: C = None
        self.u: D = None
        self.s: G = None
        self.p: J = None
        self.x: C = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: G = None
        self.t: I = None
        self.u: A = None
        self.z: I = None
        self.o: C = None
        self.txt = txt

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

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

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

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

g = A("g")
b = B("b")
m = C("m")
h = D("h")
i = E("i")
l = F("l")
a = G("a")
e = H("e")
f = I("f")
d = J("d")

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