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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.o: H = None
        self.z: A = None
        self.s: F = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.s: E = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.r: C = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.o: H = None
        self.z: A = None
        self.s: F = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.s: E = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.r: C = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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

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

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