class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: H = None
        self.y: G = None
        self.x: E = None
        self.v: E = None
        self.u: C = None
        self.q: B = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.s: E = None
        self.o: F = None
        self.u: G = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.t: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.z: B = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.y: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: A = None
        self.q: H = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: F = None
        self.s: E = None
        self.o: F = None
        self.u: G = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.t: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.z: B = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.y: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: A = None
        self.q: H = None
        self.y: E = None
        self.txt = txt

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

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