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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.s: A = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

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

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

l = A("l")
i = B("i")
a = C("a")
g = D("g")
e = E("e")
n = F("n")
j = G("j")
m = H("m")
f = I("f")

l.w = i
i.s = e
a.q = i
a.w = f
a.o = f
a.v = m
a.t = g
a.y = l
g.t = n
g.w = f
g.r = j
g.o = i
e.o = l
e.u = j
n.q = g
n.t = g
j.z = l
j.s = l
j.q = i
j.x = a
j.w = n
m.y = n
m.v = n
m.z = n
m.w = e
m.t = e
m.s = j
m.r = f
f.s = l
f.w = j
f.t = m
f.q = g
f.z = g
f.r = i
assert f.q.r.x.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.s: A = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

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

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

l = A("l")
i = B("i")
a = C("a")
g = D("g")
e = E("e")
n = F("n")
j = G("j")
m = H("m")
f = I("f")

l.w = i
i.s = e
a.q = i
a.w = f
a.o = f
a.v = m
a.t = g
a.y = l
g.t = n
g.w = f
g.r = j
g.o = i
e.o = l
e.u = j
n.q = g
n.t = g
j.z = l
j.s = l
j.q = i
j.x = a
j.w = n
m.y = n
m.v = n
m.z = n
m.w = e
m.t = e
m.s = j
m.r = f
f.s = l
f.w = j
f.t = m
f.q = g
f.z = g
f.r = i
assert f.q.r.x.w.t.txt == "m"