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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.o: E = None
        self.r: H = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.o: E = None
        self.r: H = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

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

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

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