class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: B = None
        self.x: I = None
        self.s: H = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.o: D = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: B = None
        self.x: I = None
        self.s: H = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.o: D = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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