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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.y: F = None
        self.w: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: D = None
        self.y: F = None
        self.w: C = None
        self.t: E = None
        self.txt = txt

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

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

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