class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: I = None
        self.r: G = None
        self.q: G = None
        self.w: E = None
        self.p: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: C = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.u: C = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.p: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: I = None
        self.r: G = None
        self.q: G = None
        self.w: E = None
        self.p: E = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: C = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: C = None
        self.u: C = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: B = None
        self.p: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

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

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