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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.q: H = None
        self.v: B = None
        self.p: D = None
        self.y: G = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.q: H = None
        self.v: B = None
        self.p: D = None
        self.y: G = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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