class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: F = None
        self.r: C = None
        self.v: B = None
        self.s: C = None
        self.t: E = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.q: B = None
        self.u: H = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.o: I = None
        self.z: B = None
        self.s: I = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.q: B = None
        self.u: H = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.o: I = None
        self.z: B = None
        self.s: I = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

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

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