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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: I = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: H = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.x: I = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.s: B = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: I = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: H = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.x: I = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.s: B = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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