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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.v: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.v: G = None
        self.u: A = None
        self.y: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.v: F = None
        self.u: H = None
        self.z: H = None
        self.s: I = None
        self.x: H = None
        self.p: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.y: G = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.v: G = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.v: G = None
        self.u: A = None
        self.y: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: C = None
        self.v: F = None
        self.u: H = None
        self.z: H = None
        self.s: I = None
        self.x: H = None
        self.p: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.y: G = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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