class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: C = None
        self.o: H = None
        self.s: E = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: I = None
        self.q: G = None
        self.r: G = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: I = None
        self.p: C = None
        self.q: A = None
        self.s: B = None
        self.v: B = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: I = None
        self.q: G = None
        self.r: G = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: I = None
        self.p: C = None
        self.q: A = None
        self.s: B = None
        self.v: B = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: F = None
        self.txt = txt

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

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