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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.z: D = None
        self.q: D = None
        self.v: I = None
        self.s: A = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: H = None
        self.p: D = None
        self.w: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.o: E = None
        self.t: D = None
        self.s: G = None
        self.y: B = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.z: D = None
        self.q: D = None
        self.v: I = None
        self.s: A = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: H = None
        self.p: D = None
        self.w: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: F = None
        self.o: E = None
        self.t: D = None
        self.s: G = None
        self.y: B = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

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

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