class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.p: B = None
        self.y: G = None
        self.t: D = None
        self.q: E = None
        self.z: G = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.s: G = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: A = None
        self.y: G = None
        self.r: E = None
        self.p: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: I = None
        self.v: C = None
        self.y: I = None
        self.u: F = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.z: C = None
        self.v: B = None
        self.p: C = None
        self.x: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.s: G = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: A = None
        self.y: G = None
        self.r: E = None
        self.p: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: I = None
        self.v: C = None
        self.y: I = None
        self.u: F = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.z: C = None
        self.v: B = None
        self.p: C = None
        self.x: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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