class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: G = None
        self.x: B = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.r: B = None
        self.x: I = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.x: E = None
        self.o: F = None
        self.u: A = None
        self.q: D = None
        self.t: D = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.r: B = None
        self.x: I = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.x: E = None
        self.o: F = None
        self.u: A = None
        self.q: D = None
        self.t: D = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

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

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