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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.y: F = None
        self.t: H = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.w: A = None
        self.r: A = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: G = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.y: F = None
        self.t: H = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.w: A = None
        self.r: A = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: G = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

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

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