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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.t: G = None
        self.y: G = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.r: H = None
        self.w: E = None
        self.s: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: C = None
        self.q: I = None
        self.u: B = None
        self.x: G = None
        self.w: I = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: B = None
        self.y: B = None
        self.p: I = None
        self.q: C = None
        self.v: H = None
        self.u: B = None
        self.w: C = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: D = None
        self.t: G = None
        self.y: G = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.r: H = None
        self.w: E = None
        self.s: A = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: C = None
        self.q: I = None
        self.u: B = None
        self.x: G = None
        self.w: I = None
        self.t: B = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: B = None
        self.y: B = None
        self.p: I = None
        self.q: C = None
        self.v: H = None
        self.u: B = None
        self.w: C = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.txt = txt

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

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

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