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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: G = None
        self.v: I = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: B = None
        self.p: I = None
        self.o: E = None
        self.z: G = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: G = None
        self.v: I = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: B = None
        self.p: I = None
        self.o: E = None
        self.z: G = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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